Consuming the system query service

The query service is one of the built-in system services in Dynamics AX. The service provides a set of operations allowing any AOT or dynamic query to be executed. The results are returned as an ADO.NET DataSet object. The query service cannot be customized and is hosted on the Application Object Server at a fixed address.

In this recipe, we will create a .NET console application that will connect to the query service. The application will retrieve a list of currencies in the system, with the help of a dynamically created query.

How to do it...

Carry out the following steps in order to complete this recipe:

  1. In Visual Studio, create a new Visual C# Console Application project named ConsumeSystemQueryService.
  2. Add a ...

Get Microsoft Dynamics AX 2012 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.