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

Lookups and Javascript – Dynamics CRM

// Get Lookup var LookupField = Xrm.Page.data.entity.attributes.get("FieldName"); // Get Lookup ID // NOTE: To avoid possible errors, verfy that the lookup has value with: //   If(LookupField != null) var LookupID = Xrm.Page.data.entity.attributes.get("FieldName").getValue()[0].id; // Get Lookup Value Name // To avoid possible errors, verfy that the lookup has value with: //   If(LookupField != null) var LookupName … Continue reading Lookups and Javascript – Dynamics CRM