Category Archives: Client side JavaScript

CRM 2013: JavaScript – RetrieveMultiple records using FetchXML query and SOAP Endpoint

When retrieving information from multiple related records, I prefer using FetchXML and the SOAP endpoint over OData. To use FetchXML with JavaScript, we need the “RetrieveMultiple” message in the CRM Organization Service, which is available via what the CRM 2013 SDK (version 6.0.2 at time of writing) calls the “Modern App SOAP endpoint”.

Continue reading CRM 2013: JavaScript – RetrieveMultiple records using FetchXML query and SOAP Endpoint

CRM 2013: JavaScript – Update Entity Image using Rest endpoint without jQuery

CRM 2013 introduced a new type of entity attribute called an “Entity Image”. Once an entity is configured to show an image, each entity record can have at most one image associated with the record, to be displayed on the top left corner next to the title of the record.

If we wish to change the image dynamically using JavaScript, here’s how…

Continue reading CRM 2013: JavaScript – Update Entity Image using Rest endpoint without jQuery

CRM 2013: JavaScript – Retrieve record using OData/REST endpoint without jQuery

The CRM 2013 SDK states that jQuery in form scripts and ribbon commands is not recommended. So how do I RETRIEVE (or create, update, delete) attribute values for a related record using JavaScript? It turns out that using Ajax and the OData endpoint to manipulate the XMLHttpRequest object is the key.

In addition, I shall make use of several new XRM methods, including “Save”,  “alertDialog” and “getClientUrl” method. So, here we go!

Continue reading CRM 2013: JavaScript – Retrieve record using OData/REST endpoint without jQuery

CRM 2013 Beta: JavaScript – Form/Control Notifications and Preventing Autosave

In this post I shall discuss some of the new ad exciting changes in the CRM 2013 SDK for client side JavaScript. In particular I shall highlight 4 new Xrm.page methods to do with placing notifications on a CRM 2013 form, and how to prevent auto-save via JavaScript.  To find out more, read on…

Continue reading CRM 2013 Beta: JavaScript – Form/Control Notifications and Preventing Autosave