O'Reilly logo

Microsoft Dynamics AX 2012 Services by Kenny Saelen, Klaas Deforche

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating custom services

In this section, we will discuss two custom services. One service focuses on exposing data from Microsoft Dynamics AX 2012, the other on exposing business logic.

The Title service

We will use the CVRTitleService service as an example to demonstrate how to create a simple yet powerful service. The service will allow an external program to do the following two things:

  • Retrieve details of a title based on its ID
  • Retrieve a list of all titles

The Title data contract

Let's start by creating a new class for the data contract that will contain the data for one title. Create a new class and name it CVRTitleContract. In the class declaration, add DataContractAttribute to specify that the class is a data contract. Also declare the variable's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required