We will look at some basic examples for creating, updating, retrieving, and deleting an entity.
Create an entity
The following is a code for Web API that creates a new record for the entity account. For that first, we will create a JSON object and set the required properties:
//Creates a JSON object for an Entity to be created.var entity = {};//Sets the properties for entity.entity.accountnumber = "AC1009348YU";entity.name = "Shree Technosoft";entity.telephone1 = "9978759612";var req = new XMLHttpRequest();req.open("POST", Xrm.Page.context.getClientUrl() + "/api/data/v8.2/accounts", true);req.setRequestHeader("OData-MaxVersion", "4.0");req.setRequestHeader("OData-Version", "4.0");req.setRequestHeader("Accept", ...