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

Advertisements

Your changes have not been saved – Dynamics CRM

Sometimes the error "Your changes have not been saved CRM" appears in CRM when you try to refresh a form using JavaScript and the form is dirty or haven't finished saving the changes. Hence, we need to validate whether the form is ready for the update. Find below a way to do this validation: var … Continue reading Your changes have not been saved – Dynamics CRM