This post is machine-translated. The original post in german language can be found here.

SysOperation-Framework: Controlling ExecutionMode and server method to be executed using the MenuItem

If you want to control the SysOperationExecutionMode and/or the server method to be executed via the MenuItem in a SysOperation construct, you can control this via the properties of the MenuItem.

Scenario: Without own controller

The following two MenuItems show how to set the properties for them:

This MenuItem calls the runService() method of a service class and sets the SysOperationExecutionMode to Synchronous:

Screenshot

The second MenuItem calls another method of the same class, and ensures that the processing is carried out via batch processing via the SysOperationExecutionMode ScheduledBatch.

Screenshot

 

Scenario: With own controller

If you have your own controller, you can of course also set the properties on the MenuItem:

Screenshot

The query can be made in the main() of the controller as follows:

class TutorialSysOperationServiceController
    extends SysOperationServiceController
{
}

 

public static void main(Args _args)
{
    TutorialSysOperationServiceController controller;
    identifierName className;
    identifierName methodName;
    SysOperationExecutionMode executionMode;

    [className, methodName, executionMode] = SysOperationServiceController::parseServiceInfo(_args);
    controller = new TutorialSysOperationServiceController(className, methodName, executionMode);
    controller.parmArgs(_args);

    controller.startOperation();
}

 

These post applies to following version:
Dynamics AX 2012

Add comment
 
 

 

 
 
 
Posts of the actual month
Oktober 2019
MoTuWeThFrSaSu
 123456
78910111213
14151617181920
21222324252627
28293031 
 
© 2006-2019 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.