Showing posts with label controller for d365. Show all posts
Showing posts with label controller for d365. Show all posts

Thursday, 23 January 2020

Controller class for SysoperatonFramework D365 Dynamics AX

Hi,
In the below post you will see the sysoperation framework controller class which can be used to run the class form the controller class.

[SysOperationJournaledParametersAttribute(true)]
class MyclassController extends SysOperationServiceController
{
    public static void main(Args args)
    {
        MyclassController controller;
        controller = MyclassController::newFromArgs(args);
     
        controller.startOperation();
    }
    public void new()
    {
        super();
   
        this.parmClassName(classStr(MyclassService));
        this.parmMethodName(methodStr(MyclassService, processClassMethod));
        this.parmExecutionMode(SysOperationExecutionMode::Synchronous);
        this.parmDialogCaption("@Label");
    }

    public ClassDescription caption()
    {
        return "@Label";
    }

    public static MyclassController  newFromArgs(Args _args)
    {
        MyclassController    controller;
           
        controller = new MyclassController();
        controller.initializeFromArgs(_args);
        return controller;
    }
}

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...