web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    236,316 Most Valuable Professional on at
    RE: Batch job executing older code from method though expected code runs fine through Client and AOT

    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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans