Category Archives: Ms Dynamics CRM 2013

Restrict Lookup Types for Regarding Lookup on Activities


With the following couple of lines of code, we can easily restrict the Lookup Types in Lookup Dialog. var regarding = Xrm.Page.getAttribute(“regardingobjectid”); regarding.setLookupTypes([“account”,”contact”]); Advertisements

Posted in CRM, Java Script, Ms Dynamics CRM 2013, MS Dynamics CRM 2015, MS Dynamics CRM 2016 | Tagged , , , , , , , , , , , , , , , | 2 Comments

Command for Generating Optionsets


Command for generating Optionsets: 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://<domain name>/XRMServices/2011/Organization.svc ^ /username:<user name> ^ /password:<Password>^ /out:OptionSets.cs

Posted in CRM, Ms Dynamics CRM 2013, MS Dynamics CRM 2015, MS Dynamics CRM 2016 | Leave a comment

Calling the Web Service through Java Script


Download the Soap client script from Codeplex: http://javascriptsoapclient.codeplex.com/ Then Add the Soap client script file on Form consume the functions to call the external public hosted web service. Sample code to call the web service using the Soap client. function … Continue reading

Posted in Ms Dynamics CRM 2013 | Leave a comment

Re-Activate Case Plugin


If Case is getting Re-Activated and need to perform some logic. Following is the Code snippet. It should be registered on both messages i.e. SetState and SetStateDynamicEntity. IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); if (context.InputParameters.Contains(“EntityMoniker”) && context.InputParameters[“EntityMoniker”] is EntityReference) { EntityReference entity … Continue reading

Posted in CRM, Java Script, Ms Dynamics CRM 2013, MS Dynamics CRM 2015 | Leave a comment

Resolve Case without Case Resolution Dialog


Resolve Case without case Resolution dialog pop-up: Create a Boolean attribute, place it on form and set visible false. Create a Ribbon Command on Case using Ribbon Workbench. Create a client side script (java script) to update the Boolean flag … Continue reading

Posted in CRM, Java Script, Ms Dynamics CRM 2013, MS Dynamics CRM 2015 | 2 Comments

Save, Resolve the Case and Refresh the Form


//Save the Form Xrm.Page.data.entity.save(); //Build Request – Here the Status would be “Resolved” and Status Reason is 5 i.e. Problem Solved Pass Entity ID var request = “<s:Envelope xmlns:s=’http://schemas.xmlsoap.org/soap/envelope/’>&#8221; + ” <s:Body>” + ” <Execute xmlns=’http://schemas.microsoft.com/xrm/2011/Contracts/Services&#8217; xmlns:i=’http://www.w3.org/2001/XMLSchema-instance’>&#8221; + ” <request … Continue reading

Posted in CRM, Java Script, Ms Dynamics CRM 2013, MS Dynamics CRM 2015 | 1 Comment

Changing Dashboard Default Setting


1. Open a Powershell window on your CRM server – ‘Start > Run > “PowerShell” > OK‘. 2. Add the Microsoft Dynamics CRM PowerShell snap-in – ‘Add-PSSnapin Microsoft.Crm.PowerShell‘. 3. Enter the following command to retrieve the current setting – ‘$setting … Continue reading

Posted in Ms Dynamics CRM 2013, MS Dynamics CRM 2015 | Leave a comment