Status Change using WebApi

In Dynamics 365, OOTB status field value can be changed in many different ways. Following WebApi can be used to update the Status (statecode + statuscode) as follows. changeStatus = function (executionContext, entityLogicalName, recordId, statecode, statuscode) { // Remove brackets from the GUID if there's any var id = recordId.replace("{", "").replace("}", ""); // Set statecode … Continue reading Status Change using WebApi

Xrm.Utility : openEntityForm with Parameters

Using "openEntityForm" a CRM form can be opened. While it is opening, different form fields values can be populated and those values can be passed to the form. Xrm.Utility.openEntityForm(name,id,parameters,windowOptions) name: Entity Logical Name id: Record id parameters: Form id, Field Ids, and Values, Custom query string parameters windowOptions: Flag to open as a New Window … Continue reading Xrm.Utility : openEntityForm with Parameters

Layered Multi Select Checkboxes – Custom Controls in CRM – Part 2

Layered multi level checkboxes challenge can be acheived by using CRM Optionset control and javascripts too. However there is a technique to be used to identify parent and child levels of the multi layered checkboxes. Each picklist item's value can be used to decide the layer of the checkbox. Control looks like this in the … Continue reading Layered Multi Select Checkboxes – Custom Controls in CRM – Part 2

Multi Select Checkboxes – Custom Controls in CRM – Part 1

Multi select check boxes control is a very essential control in web forms. Some times client needs exactly the same feature in CRM forms as well. When the requirement is to develop a dynamic multi select checkboxes control its really difficult for the developer to implement the feature in CRM. CRM developers will have a … Continue reading Multi Select Checkboxes – Custom Controls in CRM – Part 1

Disable Required Fileds When Hide Tabs in CRM 2011

There are requirements to hide tabs according to the selections in the form and if any tab contains required fields it will display them automatically and asking user to fill those fields when saving the form. Following Javascript function will disalbe all the controls in the tab and then it will not ask user to … Continue reading Disable Required Fileds When Hide Tabs in CRM 2011

Intellisense for Xrm.Page in CRM 2011

In CRM 2011 javascripts for crm forms can be stored externally as web resources and those are no longer embedded in CRM forms. Javascripts in web resources can be edited using an external editor. Visual Studio IDE provides intellisense to the Javascripts in Xrm.Page with the help of XrmPage-vsdoc.js. It works with Visual Studio 2010 … Continue reading Intellisense for Xrm.Page in CRM 2011

Set Server Url to OData Query Dynamically using JavaScripts in CRM 2011 Forms

Following statement can be used to retrieve accounts from the CRM application with the MyOrganization hosted in DevServer. http://DevServer/MyOrganisation/xrmservices/2011/OrganizationData.svc/AccountSet?$select=swmship_FirstName,swmship_Surname&$filter=startswith(Address1_City,'Ca') "http://DevServer/MyOrganisation/" part is varried according to the hosted server and the organization and it might raise errors when the above OData query get executed in some other CRM application. Following JavaScript can be used to get … Continue reading Set Server Url to OData Query Dynamically using JavaScripts in CRM 2011 Forms