Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Start job by code

(0) ShareShare
ReportReport
Posted on by 3,231

How can I start a Job by X++ Code?

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Start job by code

    Hi Martin,

    Thank You very much for your help to people.

    Its working great..

  • Verified answer
    Martin Dráb Profile Picture
    233,724 Most Valuable Professional on at
    Re: Start job by code

    You can do that, 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:

    //you can change the type of called object without changing the invocation code
    MenuFunction::runClient(menuItemActionStr(YourMenuItem), MenuItemType::Action);

    or to run an application object via TreeNode:

    #AOT
    ;
    TreeNode::findNode(strFmt(#JobPath, identifierStr(YourJob))).AOTrun();

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
Zain Mehmood Profile Picture

Zain Mehmood 6 Moderator

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans