Introduction
V9.0 has loads of new and exciting features. One of the most exciting improvement, at least for developers, is Xrm.WebApi. Prior to v9.0, to perform CRUD operations in Dynamics CRM, either we had to make our own library, utilize external libraries or create custom request using XmlHttpRequest and ajax. Xrm.WebApi is a cool improvement included in Dynamics 365 v9.0 which will make it easier for developers to perform CRUD operations.
Learn more about Dynamics 365 Services
Create Entity Record
To create an entity record, we can simply call Xrm.WebApi create Record using the following parameters.
- Entity logical name
- Entity object
Associate Existing Entity Record
To associate new entity records to existing entity records, set the value of single-valued navigation properties using the @odata.bind annotation. The following example creates a contact record and associates it to an existing account record.
Read more: Using Microsoft Power Automate to set the Contact record Image in D365 from Twitter
Elevate your CRM Experience with Dynamics 365!
Elevate your CRM strategies and achieve better customer engagement with AlphaBOLD. Start transforming your customer interactions today.
Request a DemoCreate Related Entity Records
In Dynamics CRM, we also need to relate records with each other. For example, any opportunity is related to any account record. When creating an account record, we need to relate another record with it. Flowing is the code to relate opportunity with account entity.
Update Entity Record
To update the record, we will create object of the entity and then set the fields and its value, that we need to update and then call Xrm.WebApi.updateRecord function to create the record in CRM. The parameters of this function are as shown below:
- Entity logical name
- Entity GUID
- Entity object
Delete Entity Record
To delete record from CRM, use Xrm.WebApi.delete Record.
The parameters of this function are shown below:
- Entity logical name
- Entity GUID
Retrieve Single Entity Record
Retrieve Multiple Records
Retrieve Related Entity Record
Optimize your Operations with Dynamics 365 Integration!
Ready to integrate advanced CRM functionalities using Dynamics 365 v9.0? Let AlphaBOLD help you optimize your operations and enhance customer relationships through powerful integration solutions.
Request a Demo