CRUD (create, read, update, delete) operations using the Xrm.WebApi.online.execute
and Xrm.WebApi.online.executeMultiple
methods of the Dynamics 365 Client API, with JavaScript, are not very well documented in the official Microsoft documentation. The Xrm.WebApi.online.execute (Client API reference)
documentation has no code samples for CRUD opertations.
So, here are code samples to get you going…
CRUD Opertations with Xrm.WebApi.online.execute
Below are some code samples for running CRUD operations using the Xrm.WebApi.online.execute method.
Create
Retrieve
Update
Delete
CRUD Opertations with Xrm.WebApi.online.executeMultiple
Below are some of code samples for running CRUD operations using the Xrm.WebApi.online.executeMultiple method.
Note: As per the OData v4 specifications, you cannot include read operations as part of a change set.
Create
Retrieve
Update
Delete
Sources
Sample code derived from pending pull request #626.