Thursday, October 10, 2024

Using SysOperationSandbox::callStaticMethod Sample in D365FO X++

 SysOperationSandbox::callStaticMethod(classnum(Classnum(<Class name>)), staticMethodStr(<Class name>, <Class static method name>), [<Parm1>, <Parm2>,<Parm3>], "<operation completion Message>");


 public static void updateOpr(container _callerParams)

 {

     if (conlen(_callerParams) != 3)

     {

         throw error("");

     }

     

     Anytype parm1 = conPeek(_callerParams, 1);

     Anytype parm2 = conPeek(_callerParams, 2);

     Anytype parm3 = conPeek(_callerParams, 3);        

        //Business Logic

 }

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...