Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Update cross reference in batch in Dynamics AX 2012

(0) ShareShare
ReportReport
Posted on by 40

This post is based on Dynamics AX 2012 R3.

static void UpdateCrossRefBatch(Args _args)

{

;

xRefUpdate::truncateXrefTables();

xRefUpdateIL::updateAllXref(true, false, true);

info("Done, cross reference update batch job created.");

}

Can someone please explain me this code, thanks.

*This post is locked for comments

  • Kothamasu pavan Profile Picture
    40 on at
    RE: Update cross reference in batch in Dynamics AX 2012

    Hi,

    ievgen Miroshnikov and Vilmos Kintera

    Thanks for detail explanation.

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: Update cross reference in batch in Dynamics AX 2012

    Running the xRef update from the menu to execute within the AX client is taking a very long time, 10-12 hours easily. If you kick it off in a batch job by running an X++ job, it could finish in 2-3 hours server-side instead. That is the purpose of the above code, rebuilding cross-references faster.

    Please mark helpful answers as Verified next to each post with the checkbox.

  • Verified answer
    Mea_ Profile Picture
    60,278 on at
    RE: Update cross reference in batch in Dynamics AX 2012

    Hi Kothamasu pavan ,

    First line will drop all data from cross references table and second will kick off batch job to rebuild it. If you don't familiar with cross references you need to read this article msdn.microsoft.com/.../aa626961.aspx

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans