Announcements
No record found.
Hi All,
Can somebody explain which situation we use SysOperationController/ SysOperationServiceController class? why?
Regards,
Nunna.
*This post is locked for comments
What do you mean by using? When to call it? Or when to override its methods?
Hi Nunna, from MSDN: "The SysOperationsServiceController class is the base controller class for working with service operations". My controller classes have always extend from this class.
The SysOperation framework and its supporting classes are similar to the RunBase classes. The book "Inside Microsoft Dynamics AX 2012" even goes so far as to say that "the SysOperation framework replaces the RunBase framework to provide support for business transaction jobs... " (p. 493). In practice though RunBase is still used and I create more RunBase classes than I do SysOperation classes.
This probably still doesn't answer your question though.
I use SysOperation and RunBase classes anytime I want to allow an end user to "do something" where that something isn't a report run or opening some other form. For example, a label printer. We print these labels that go on cards and the primary information for them is stored in the item coverage (ReqItemTable).
It makes sense to print them from the Item Coverage form. So now we know that we need a menu item and that the menu item needs to point to something. People write a lot of SSRS reports, but that's not going to work too well since the label printer has this proprietary software and drivers. So I need a class that is runnable, that can create and invoke COM objects so that it can talk to the printer, and eligible to be linked to a menu item so that I can actually put a button in the action pane. The SysOperation and RunBase classes fill this need. We can create child classes of these with main methods so that the end user can invoke the action with the click of button. As an added benefit both frameworks support batching so you can give your end users the option to batch things with a little extra work.
As far as the two frameworks are concerned, RunBase is a little simpler and easier to use while the SysOperation framework has more flexibility and features. On an interesting side note, the class SrsReportRunController extends the class SysOperationController so if you have done very much work with report writing in AX it's highly likely that you were already unknowingly building code on top of the SysOperation framework.
Hi Martin,
My question is when should we extend these classes?
My observation is, all SSRS reports are derived from SysOperationController,
all SysOperation framework controller classes are derived from SysOperationServiceController class. Why we had that difference ?
Could you please elaborate...
Thanks ,
You don't need to create your own controller to run a batch or something; you can simply pass the name of the method to run and the standard controller do all the rest - creates a dialog, serializes parameters, runs the method... You implement your own controller if you want to do something more, e.g. to modify the data contract in some way.
Reports use SrsReportRunController, which implement some report-specific logic such as dealing with print destinations.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CP04-islander 28
Michel ROY 14
imran ul haq 8