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)

New to AX - How to create a job to update a table

(0) ShareShare
ReportReport
Posted on by 790

I'm new to AX development.  I am using AX 2012.  I want to create job that will update a field in table ProdRoute.  When I do a search on "AX jobs", I get employment jobs! :)

Here is the business logic:

1. Loop thru all ProdRoute rows.

2. Check field QtyGood.  If greater than 0 then update boolean field OprFinished = True.

3. If QtyGood is 0, then do nothing.

Seems like this should be easy but I cannot find an example.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Muhammad Afsar Khan Profile Picture
    2,676 on at

    Here is the code format of solution:

    public static updateRoutejb(Args args)

    {

    ProdRoute   ProdRoute ;

    while select forupdate ProdRoute

    {

       if (ProdRoute .QtyGood > 0)

       {

           ProdRoute.OprFinished = true;

           ProdRoute.update();

       }

       info ("Done");

    }

    }

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans