Skip to main content

Notifications

Announcements

No record found.

Call a Data Entity from Postman for Dynamics 365 F & O

In this article we will understand how to call a data entity from Postman.


From our previous article we have successfully configured Postman and generated a token and saved it in access_token variable to make a call to F&O. Now let us deep dive into understanding of calling a Data Entity from Postman.


Calling a Data Entity:


To call a data entity, click on New button beside Import in Postman to create a new http Request by selecting like below.



Set the request type to GET since we are retrieving the data from F&O.

In the URL, enter like following.

https://<F&O URL>/data/<Public Collection Name>

Replace the <F&O URL> with the actual FO URL. And replace the <Public Collection Name> with name of the Entity's Public Collection Name from above.

Set the Authorization Type to Bearer Token and for the Token, give the variable which was created for keeping the tokens like {{access_token}}.

Since I'm already having a variable for storing F&O URL which was created in my last article, I'm directly using it.



On successful configuration of all the said details and hitting on Send, we get 200 OK response with the below payload. This means that we have successfully requested FO from Postman to retrieve data.

But wait! Why is data not showing up?

To get the data, a Cross Company filter needs to be specified which shows the data from all the legal entities. It is something like crossCompany keyword in X++.

Below is the OData Query for the same which has to be provided in the URL.

https://<F&O URL/data/<Public Collections Name>?cross-company=true

We can also get data specifically from 1 particular legal entity or we can get data of specific field list too. We can also perform CRUD Operations using the above approach by giving different queries.

In this way, we can call a Data Entity and retrieve the data.

We will learn more about OData in coming blogs.

This is for now.


Stay Tuned!

Happy Learning!


Comments