Use Postman Tool To Create And Update Records In Dynamics CRM

Introduction

One of the common scenarios to work with CRM Web APIs is to quickly create or update records in Dynamics CRM. In less time, we can achieve this requirement using the Postman tool. Here is an example going to create and update the contact record.

Step 1

Open the Postman tool, desktop version and make a new request and name it as Create Contact and select respective Environment and select respective HTTP verb and provide below URL.

HTTP verb : POST
Uri: {{webapiurl}}contacts

 as shown in the below figure.

Use Postman Tool to Create and Update Records in Dynamics CRM

Step 2

After step 1, select the Authorization tab and then select Request Headers in Add authorization data to and then click on Get New Access Token, you will get a new access token and use it to authenticate CRM Web API Request through the Postman tool as shown in the below figure.

Use Postman Tool to Create and Update Records in Dynamics CRM

Step 3

After step 2, open the respective dynamics environment and observe that no existing contact records are present as shown in the below figure.

Use Postman Tool to Create and Update Records in Dynamics CRM

Step 4

After step 3, now go back to Postman tool, Create Contact window and select body and then select a raw radio button and provide below fields in the form of JSON and click on send button as shown in the below figure.

Use Postman Tool to Create and Update Records in Dynamics CRM

Step 5

After step 4, if everything works as designed then respective contact records get created in CRM as shown in the below figure.

Use Postman Tool to Create and Update Records in Dynamics CRM

Step 6

After step 5, again open Postman tool and take a new request for update and copy record id of contact that is generated above and add it at the end of the URL with respective HTTP verb and JSON body post generation of token as,

HTTP verb: PATCH
Uri: {{webapiurl}} contacts(7ff96d6d-6f20-ec11-b6e6-000d3a34f468)
Body -> raw: JSON
{
 "birthdate": "2000-07-01"
}

 and click on send as shown in the below figure.

Use Postman Tool to Create and Update Records in Dynamics CRM

Step 7

After step 6, open the CRM contact record and observe the birthdate field populated with provided value as shown in the below figure.

Use Postman Tool to Create and Update Records in Dynamics CRM

Note

  1. Make sure to generate authorization key for every new request in Postman tool.
  2. Refer to Microsoft documentation for more details on how to form JSON and work with CRM API for creating here and for the update here.

Conclusion

In this way, one can easily create and update records in CRM using CRM Web API calls through the Postman tool.


Similar Articles