OptionSet fields and Javascript – Dynamics CRM

In order to get and set values in an OptionSet field in JavaScript, use the code below: // Get Option Set var Option_Set = Xrm.Page.data.entity.attributes.get("FieldName"); // Get Option Set / Selected Option var OptionSet_Selcted_Option = Xrm.Page.data.entity.attributes.get("FieldName").getValue(); // Get Option Set / Options var OptionSet_Options = Xrm.Page.data.entity.attributes.get("FieldName").getOptions(); // Get Option Set / Label text var OptionSet_Label_Text … Continue reading OptionSet fields and Javascript – Dynamics CRM

Show notification with Javascript – Dynamics CRM

To dynamically show a notification message in a form, use the following JavaScript code: /* Parameters: * First parameter is the text you want to display * Second parameter is to set the Message Level, these could be: INFO, ERROR, WARNING * Third parameter is just an ID for the message */  Xrm.Page.ui.setFormNotification("This is a … Continue reading Show notification with Javascript – Dynamics CRM

Duplicate workflows appearing in advanced find – CRM 365

Today while trying to call an on demand a workflow in a custom plugin, I started to see that CRM was throwing an error similar to: "The workflow should be an on-demand workflow or child workflow" and the most frustrating thing was that this workflow was already set with that configuration(On Demand). Searching for the … Continue reading Duplicate workflows appearing in advanced find – CRM 365