web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to call a job inside another job?

(0) ShareShare
ReportReport
Posted on by 1,385

Hi Pals,

I have written 2 different tasks in 2 different jobs say JobA and JobB. I need to use the JobB inside JobA like calling a some function from another object.

How to do this?

Thanks,

Aarvi.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi Aarvi,

    you can use following code to call job inside a job

    Below is the code which calling a job 'test' inside a job 'Test_nranj'

    to test this code

    you create a job with name 'test' with some executable code in it.

    and use this job to validate your requirement.

    static void Test_nranj(Args _args)

    {

       TreeNode                        aa;

       ;

       aa = treeNode::findNode(@"\Jobs\test");

       aa.AOTrun();

       winapi::shellExecute("notepad");

    }

    Please update me with your feedback.

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Simply create a class with two methods, it's a much better way.

  • arviax Profile Picture
    1,385 on at

    Hi Nitesh,

    Thanks a lot for your reply and I tried it out. It works well. :-)

    Martin,

    Am trying with the your option too.

    Thanks,

    Aarvi.

  • Community Member Profile Picture
    on at

    This good, :)

    Appreciated if you please mark my suggested answer as verified answer.

    This will help me in great way.

    Thanks for consideration

  • Khushhal Garg Profile Picture
    1,514 on at

    Jobs are deprecated in D365FO so it is OK until AX 2012 but better to use classes going forward.

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans