Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Dynamics AX 2012 Services

You're reading from   Microsoft Dynamics AX 2012 Services Everything you need to know about implementing services with Microsoft Dynamics AX 2012 is contained in this hands-on guide. Easy to follow and totally practical, it's a must for both new and experienced AX Dynamics developers.

Arrow left icon
Product type Paperback
Published in Dec 2012
Publisher Packt
ISBN-13 9781849687546
Length 196 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Custom controllers


In the earlier example, we used the SysOperationServiceController class on our menu item to run the services. This is the base controller, but you can create your own when you have the need. In this part, we will first take a look at some of the scenarios in which custom controllers can be used, after which we will create a custom controller.

Usage scenarios

What follows are two of the most common scenarios in which you would use a class that extends SysOperationServiceController . The first is using a controller to initialize a data contract, the second is a scenario in which you override methods of dialog fields.

Initializing the data contract

The controller can be used to initialize the data in the data contract. This is one of the most common scenarios in which a controller is used, and is the scenario we will demonstrate further on in this chapter. Initializing a data contract is usually done based on the Args object.

The Args object contains information such as:

  • The execution...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image