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

Creating a SysOperation service


In this demonstration, we will create a SysOperation service that detects members with overdue rentals. These members will get the blocked status by setting a checkbox on the member in the database.

The dialog for the service will look like the following screenshot:

As you can see, a query enables you to select the members for which the rentals should be checked. By enabling the checkbox, you can override the number of overdue days that are allowed before a member is blocked.

The SysOperation framework uses services to execute business logic; you have already learned most of the skills needed in Chapter 4, Custom Services.

The data contract

We will now create a new data contract, but as we have already demonstrated the creation of a data contract in the earlier chapters, we can be briefer here. The data contract that we'll make will have the following three members:

  • parmNumberOfOverdueDays: This holds the value for the number of overdue days that are allowed.

  • parmOverrideNumOfDays...