Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Microsoft Dynamics AX 2012 R2 Services
  • Table Of Contents Toc
Microsoft Dynamics AX 2012 R2 Services

Microsoft Dynamics AX 2012 R2 Services

4.6 (5)
close
close
Microsoft Dynamics AX 2012 R2 Services

Microsoft Dynamics AX 2012 R2 Services

4.6 (5)

Overview of this book

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

Creating custom services


In this section, we will discuss two custom services. One service focuses on exposing data from Microsoft Dynamics AX 2012 while the other focuses 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. This service will allow an external program to do the following two things:

  • Retrieve the details of a title based on its ID

  • Retrieve a list of all titles

Creating 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 ID, name, and description, as shown in the following code snippet:

[DataContractAttribute('Title')]
public class CVRTitleDataContract
{
    CVRTitleId      id;
    CVRTitleName    name;
    Description     description...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Microsoft Dynamics AX 2012 R2 Services
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon