My Learning


EntityCreation

this.ddlPrimaryLanguage.SelectedValue = ((int)((lss_language)Enum.Parse(typeof(lss_language), Regex.Replace(lawyerDetails.PrimaryLanguage, “[^a-zA-Z0-9_]+”, “”)))).ToString();

if “$(ConfigurationName)”==”Debug” ( “C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe” -i $(TargetPath) )

CrmSvcUtil.exe /url:http://hydvlscmvm13/CRMDevSandbox/XRMServices/2011/Organization.svc /out:MyOrganization.cs /username:abhipan /password:useful@123 /domain:myDomain /namespace:Domain.Isis.Xrm /serviceContextName:XrmServiceContext

CrmSvcUtil.exe ^
/codewriterfilter:”Microsoft.Crm.Sdk.Samples.FilteringService, GeneratePicklistEnums” ^
/codecustomization:”Microsoft.Crm.Sdk.Samples.CodeCustomizationService, GeneratePicklistEnums” ^
/namingservice:”Microsoft.Crm.Sdk.Samples.NamingService, GeneratePicklistEnums” ^
/url:http://hydvlscmvm13/CRMDevSandbox/XRMServices/2011/Organization.svc ^
/out:OptionSets.cs

SPWebApplication, SPSite, SPWeb

A SharePoint Web application (SPWebApplication) is web site inside Internet Information server, A web application can have multiple sites , a Site (SpSite) is a collection of a single top level site (SPWeb) and group of sites (SPWebCollection) and sub sites.

Type comparison in CRM 4 and CRM 2011

http://cid-2312e1103cbe5ecd.office.live.com/view.aspx/Public/Type%20Mapping%20Between%20Versions.docx

All plugin run in child pipeline in CRM 2011.

Pre Post sync events are inside the CRM Trasaction

CRM 2011-You cannot add new navigation groups or remove existing ones. If a particular navigation group does not have any views to display, the navigation group will not display. This means you can remove a group by configuring individual navigation items to use other navigation groups.

If we have a Post Create plugin that throws exception registered on Parent Pipeline. The record would still get created. However if we have the same plugin registered on ChildPipeline throwing an exception, the record would not get created. Child pipeline is part of the Transaction so it is rolled back.

We can register more than one pre/post entity image for each steps during plugin registration.

function for calling Close Opportunity dialog box

complete();

report url

http://servername/orgname/crmreports/viewer/viewer.aspx?action=run

&id={8D2FCC14-2A2B-4BA8-B070-A29787E37E57}&context=records
&recordstype=1088

&records={81D8C017-882A-DE11-95E0-00110A5CDC7F}&helpID=Purchase%20Order.rdl

id= guid of the report

recordstype= object id of the entity

records= id of the entity record

helpID= name of the report

For Post Update Callout values would only be passed when they are registered using callout.config. Values would be passed irrespective of whether it is changed or not. Value wouldn’t be passed in case if they are null.

We could use CancelSalesOrderRequest in PostUpdate callout or plugin without infinite loop issue.

Canceled order cannot be activated, the only option is through direct query against database.

When salesorderdetail is created it also fires update of sales order and create of itself for plugins.

We can update salesorderdetail from salesorder update callout or plugin without triggering infinite loop.

CrmService.asmx would always be pointing to wsdl for the default organization set in deployment manager. For a specific organization we need to use following query parameter.

http://<servername[:port]>/mscrmservices/2007/crmservice.asmx?
WSDL&uniquename=organizationName

In input parameters while updating a record , only the attributes that are modifed would be there, however if we are raising an InvalidPluginExecutionException and then trying to update that record, this time it would contain all the attributes that has value as inputparameters.

Inputparameters target property for SalesOrderDetail Post Create.

+        [0]    {[salesorderid, Microsoft.Crm.Sdk.Lookup]}    System.Collections.Generic.KeyValuePair<string,object>

+        [1]    {[isproductoverridden, Microsoft.Crm.Sdk.CrmBoolean]}    System.Collections.Generic.KeyValuePair<string,object>

+        [2]    {[productid, Microsoft.Crm.Sdk.Lookup]}    System.Collections.Generic.KeyValuePair<string,object>

+        [3]    {[uomid, Microsoft.Crm.Sdk.Lookup]}    System.Collections.Generic.KeyValuePair<string,object>

+        [4]    {[ispriceoverridden, Microsoft.Crm.Sdk.CrmBoolean]}    System.Collections.Generic.KeyValuePair<string,object>

+        [5]    {[quantity, Microsoft.Crm.Sdk.CrmDecimal]}    System.Collections.Generic.KeyValuePair<string,object>

+        [6]    {[salesrepid, Microsoft.Crm.Sdk.Lookup]}    System.Collections.Generic.KeyValuePair<string,object>

+        [7]    {[willcall, Microsoft.Crm.Sdk.CrmBoolean]}    System.Collections.Generic.KeyValuePair<string,object>

+        [8]    {[shipto_freighttermscode, Microsoft.Crm.Sdk.Picklist]}    System.Collections.Generic.KeyValuePair<string,object>

+        [9]    {[iscopied, Microsoft.Crm.Sdk.CrmBoolean]}    System.Collections.Generic.KeyValuePair<string,object>

+        [10]    {[pricingerrorcode, Microsoft.Crm.Sdk.Picklist]}    System.Collections.Generic.KeyValuePair<string,object>

+        [11]    {[salesorderispricelocked, Microsoft.Crm.Sdk.CrmBoolean]}    System.Collections.Generic.KeyValuePair<string,object>


19 thoughts on “My Learning”

  1. Hi Nishant, I am trying to create a salesorderdetail record in a plug-in (crm 2011 online) using create message. When a new order is created, I would need the plug-in to create a salesorder detail based on the product, price per unit, quanity that I create in a cutom attributes in Sales Order. Could you help me with how I can create the sales order detail in the plug-in. I can set the value for e.g. salesorderdetail.description = “new detail’; But How can I do this –> salesorderdetail.productid.id = salesorder.v_product ?

    Like

  2. Hello Nishant, I need to convert a SQL into FETCH xml (essentially I have a CRM 4.0 sql report that I need to migrate to CRM 2011 Online). It has LEFT OUTERJOINS. I am wondering if you could help me with the same. Thanks a lot in advance. Pls email me or contact me.

    Like

  3. Hi Nishant,

    I am stuck in a major query….
    I need to send campaign email through CRM (easy and worked as email entity used)….and (the most worst part) need to attach an attachment into it as well. I have tried making plugin and workflow…but none of them worked.
    Also i tried doing it manually in a different organisation but again failed.

    Please nishant try to solve this problem.

    Thanks and Regards,
    Shivam Dixit

    Like

  4. Hi Nishant,

    We saw this URL as soon as we got a look at your blog about two weeks back…

    Have even raised this issue on Microsft Dynamics forum… Hope to to get some help from there too…

    Will inform you if even we find some solution for this. 🙂

    Regards,
    Vikas Chitale.
    Pune, India.

    Like

    1. Hi Vikas,
      Ok so you have posted it on MS CRM forum as well.
      Well you know i had even asked Andriy, a top answerer on that forum, personally, but unfortunately he was also not sure about that.
      Do let me know if you get any solution for it, meanwhile i’d try out certain things here!

      Regards,
      Nishant Rana

      Like

  5. Yes exactly….

    Thanks a lot… even am looking into this issue for about a week now but no luck.

    Regrads,
    Vikas Chitale.
    Pune, India.

    Like

    1. Hi Vikas,

      Even i am trying out the same over here !!

      It uses this kind of url for context sensitive report

      http://servername:5555/orgname/crmreports/viewer/viewer.aspx?
      action=run
      &id=%7b2B6DF296-C3A9-DE11-B611-0003FFD21C1C%7d
      &helpID=Activities.rdl
      &context=records
      &recordstype=4200

      It seems that CRM uses some kind of session to pass guid of the selected records from the grid to the report viewer page or something like that!!

      Regards,
      Nishant Rana

      Like

    1. Thanks for such a fast reply. 🙂

      We have developed a custom grid using the code available on codeplex. In this grid we select a few of the phone calls on which we want to generate a report.

      The problem comes now as according to your blog we are able to set only one record to the filter at a time. How to assign multiple records to the filter from URL?

      Vikas Chitale.
      Pune, India.

      Like

  6. Hi Nishant,

    Thanks for this post. It is really helpful. I have a query on this though.

    I want to assign multiple records to the filter of the report. Can you provide some help on the same!!

    Thanks…
    Vikas Chitale.
    Pune, India.

    Like

  7. when i send an email from outlook to CRM online the mail is coming as email activity with status as “completed”. How to get the email status as “open” ?

    Like

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s