Back to Basics # 22: Use Postman Tool to Create and Update Records in Dynamics CRM

Introduction:

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

Step 1:

Open Postman tool, desktop version and take 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.

Step 2:

After Step 1, select 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 Postman tool

as shown in the below figure.

Step 3:

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

Step 4:

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

Step 5:

After Step 4, if everything works as designed then respective contact records gets created in crm as shown in the below figure.

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.

Step 7:

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

Note:

  1. Make sure to generate authorization key for every new request in Postman tool.
  2. Refer to Microsoft documentation for more details how to form json and work with CRM API’s  for create here and for update here .

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

One thought on “Back to Basics # 22: Use Postman Tool to Create and Update Records in Dynamics CRM

  1. Pingback: Rewind September 2021 – Common Man Tips for Power Platform, Dynamics CRM,Azure

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s