Creating custom OData queries to retrieve Dynamics AX data
Dynamics AX has a more generic web service call feature called OData Query that allows you to query tables and return them through a URL. This is useful because they can be used as read-only data sources for other programs such as InfoPath.
In this recipe, we will show how you can register your own custom query within Dynamics AX, and then access it through the OData Query web service.
How to do it...
To create an OData query, follow these steps:
To access a query through the OData Query feature, we open the Document data sources form from the Organization Administration area page within the
Document Management
folder of the Setup group.To create a new query, click on the New button in the menu bar.
The Document data sources reference the queries that are built within AOT. Usually, you don't have to build a whole new query because you can use one of the existing ones as a basis. Select a module that you would like the data source to be...