- D365 CRM Portals
- D365 CRM Environment
Why Use OData (Open Data) Protocol?
- OData provides external access to a data source via a website.
- Recommended for the Open Government Data Initiative.
- Data API for Microsoft Azure
- Data is delivered in JSON format unlike XML format.
- Use of OData for custom live reports, new feeds, external applications, or leveraged by client-side AJAX for unique Entity List UI.
Steps for Implementing Above Scenario
Step 1: The user will have to first create a new ‘Entity List’ in this case a ‘Account’ Entity List by going to Portals>Entity List and click on ‘New’ and in the Entity Name input select ‘Account’ and create a view Name “Active Accounts” that will display a grid view of all the Active Accounts as shown below in the following two images.
Now, user will have to enable the Entity List for OData Feed by checking on the ‘Enable’ option and entering the details into the input fields in the OData Feed Section for the Entity List as shown below:
Step 2: The user will have to create a Page on the CRM Portals to display the following Entity List. The user will have to use the Admin panel and click on ‘Child Page’ to create a new Page which will display the Entity List after setting the properties of the page as shown below.
Step 3: The user will now have to obtain the OData Feed by entering ‘/_odata’ to the end of the Portal URL that the user uses to open the CRM Portals which will open a XML page as shown below.
Note: The user will have to save the odata xml format and open it in another application like ‘Notepad’.
Now in the above XML format we can see that accounts is being used as the href. To obtain the JSON format of the OData Feed the user will have to add the href used in the XML format to the end of the previously seen OData URL which is shown below.
Note: The user will obtain a URL to the bottom of the JSON Format of the OData Feed which will provide the user to go to next set of records for the Entity List
The user will have to paste the code into the source code of the CRM Portal Page as shown below to which he wants to display the OData Feed as shown previously in the Scenario above and click on Save as shown below.