Category Archives: MS Dynamics CRM 2015

Remove or Hide Business Process Buttons


To Hide the Business Process Buttons cannot be done OOB. To achieve this add a HTML Web Resource on Form and paste the following code. See the magic. 🙂 HTML Web Resource: $(document).ready(function () { // Hide Next Stage button … Continue reading

Posted in CRM, HTML, Java Script, JavaScript, MS Dynamics CRM 2015, MS Dynamics CRM 2016 | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

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”]);

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

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 | Leave a comment

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