Notifications
Announcements
No record found.
Suppose i write some job somewhere then can I call it in some class method?
*This post is locked for comments
Hi Mahesh
Try with :
TreeNode Job;
Job = treeNode::findNode(@"\Jobs\Denis");
Job.AOTrun();
Hi Mahesh.
I would recommend moving your job into a class's main method if possible.
Alternately you can create a new MenuItem with ObjectType of "job" and then select your jon in the "Object" property. You can then execute the menu-item
MenuFunction menuFunction;
menuFunction = new MenuFunction(menuItemActionStr(MyMenuItem), MenuItemType::Action);
menuFunction.run();
Thanks for your replies. I will check.
Just because you can doesn't mean you should...
Jobs are intended for small, self-contained pieces of code during development (e.g. when you want to quickly try something) and shipping any jobs at all with your solution isn't a good practice. If you need to call a job from a class, it's obvious that the code should be moved from the job.
If you don't have any suitable class for your piece of code, create a new one, even if it had a single method only.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2