Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Sunday, February 9, 2014

Unable to construct an object from the class in the batch framework

Hi,

when we want to run a custom class in the server as a batch job we need to extend the RunBaseBatch class and schedule a job for it.

When the test was successful, We scheduled the job and waited for the batch job status to go from Waiting to Ended, and to surprise to get an error.

"Unable to construct an object from the class Sample Class in the batch framework. Make sure that the X++ code has been compiled to Microsoft .NET Framework CIL, and that the constructor does not require any parameters"

Steps on how to do this:

1.Open a new development environment and click Build and then choose Generate Incremental CIL.




Then, to double check if the job run well, go to System Administration > Inquiries > Batch Jobs and look for your job. It status should now be Ended.

Regards

No comments:

Post a Comment

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...