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)

Batch job executing older code from method though expected code runs fine through Client and AOT

(0) ShareShare
ReportReport
Posted on by

System: AX 2012 R3, 1 AOS Server, no load balancing, no enterprise portal, no separate batch server

As mentioned above, modified code is not being reflected properly in batch job although it runs correctly through MorphX, AOT and menu item through client.. all referencing the class directly mind you.

Context: An existing class was modified that was linked to an existing batch job, let's call it class MyClass. MyClass runs as expected through an AoT job or from a menu item which directly calls MyClass. However the batch job behaves as if reading the older code. After successfully reproducing the issue on a dev environment and debugging through Visual Studios, we were able to confirm the batch job was pulling the old code. Also through debugging we affirmed running a job through AOT runs the updated code.

So a couple of troubleshooting steps I took so far, all unsuccessful though:

1) Restart AOS
2) Stop AOS, full 64-bit compile, Start AOS, synchronize (Let's call that Full Compile)

3) Removed all entries in dbo.SysLastValue, full compile
4) Changed 'Current Version' for pack/unpack methods for MyClass, full compile

5) Set the GlobalUID to 0's, full compile

Anything else I could try?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    It seems that we've answered it in another thread where you asked, Batch job keeps retrieving old code.

    The solution was generating CIL from X++.

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