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)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++.