Book Image

Microsoft Dynamics AX 2012 R2 Services

Book Image

Microsoft Dynamics AX 2012 R2 Services

Overview of this book

Table of Contents (17 chapters)
Microsoft Dynamics AX 2012 R2 Services
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The OData query service


The last system service we will discuss is the OData query service. This service exposes data from Microsoft Dynamics AX using the Open Data Protocol (OData). This is a web protocol for querying and updating data, although Microsoft Dynamics AX 2012 currently only supports querying data.

The records that result from this querying are published as entries in an Atom feed. Atom is a web feed probably best known as being used for subscribing to updates from websites such as blogs. Atom is similar to the better known RSS but standardized, which makes it the obvious choice over RSS. OData also supports JavaScript Object Notation (JSON) as an alternative to Atom, but that is not supported by Microsoft Dynamics AX 2012.

To demonstrate this service, we will consume it using Internet Explorer and use it in our example application.

Creating and publishing a data source

Exposing data using the OData query service is very straightforward. It consists of the following:

  • Creating a query...