- _className = the string name of the AX AOT Class name.
- _methodName = the string name of the method from the AX AOT Class above.
- _params = the container which has the variables, [parameter 1, parameter 2, etc].
// From parameters:
ClassName _className
MethodName _methodName
Container _params;
// From method variables
Container result;
DictClass dictClass;
;
// This code will run the static method
executePermission = new ExecutePermission();
executePermission.assert();
dictClass = new DictClass(className2Id(_className));
result = dictClass.callStatic(_methodName, _params);
CodeAccessPermission::revertAssert();
// End DAX code
This code is dynamic and powerful. Enjoy!
Thanks for sharing fabulous information.It's my pleasure to read it
ReplyDeleteMicrosoft Dynamics CRM Online Training | Microsoft Dynamics AX Training