There is a possibility of calling a job from X++, but using a job instead of a class has only disadvantages (e.g. jobs aren't able to run on server side). Don't use jobs in any production code.
In general, you have two possibilities - to create a menu item and call it:
MenuFunction::runClient(menuItemActionStr(YourMenuItem), MenuItemType::Action);
#AOT
TreeNode::findNode(strFmt(#JobPath, identifierStr(YourJob))).AOTrun();
In general, you have two possibilities - to create a menu item and call it:
Option 1
//you can change the type of called object without changing the invocation codeMenuFunction::runClient(menuItemActionStr(YourMenuItem), MenuItemType::Action);
Option 2
Run an application object via TreeNode:#AOT
TreeNode::findNode(strFmt(#JobPath, identifierStr(YourJob))).AOTrun();
No comments:
Post a Comment