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

SysOperation-Framework: Simple class construct

The following code shows a very simple class construct for the SysOperation framework. Without the Dataprovider and UIBuilder.

Service

class TutorialSysOperationService extends SysOperationServiceBase
{
}

The method runService() is the actual service method. By means of the attribute SysEntryPointAttribute we control here that no further authorization checks are necessary.

[SysEntryPointAttribute(false)]
public void runService()
{
    info("Done");
}

 

Controller

class TutorialSysOperationController extends SysOperationServiceController
{
}

In the new()-method, we link the controller to the service class.

void new()
{
    super();

    this.parmClassName(classStr(TutorialSysOperationService));
    this.parmMethodName(methodStr(TutorialSysOperationService, runService));
}

The main()-method is the classic entry point when the controller is called via a MenuItem.

public static void main(Args _args)
{
    TutorialSysOperationController controller;

    controller = new TutorialSysOperationController();
    controller.parmArgs(_args);

    controller.parmExecutionMode(SysOperationExecutionMode::Synchronous);

    controller.startOperation();
}
These post applies to following version:
Dynamics AX 2012

 
 

 

 
 
 
Posts of the actual month
November 2024
MoTuWeThFrSaSu
 123
45678910
11121314151617
18192021222324
252627282930 
 
© 2006-2024 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.