System.InvalidCastException: Unable to cast object of type ” to type ‘Dynamics.Ax.Application.Batchable’.

When programming batch jobs you might encounter the following error message log from a failed to execute batch job:

System.InvalidCastException: Unable to cast object of type ‘<class name>’ to type ‘Dynamics.Ax.Application.Batchable’.

The cause of the problem is typically because the CIL has not been compiled for the batch job you are running. Since batch jobs only run in CIL it is important to ensure the CIL compile is complete before trying to run your batch jobs. This can be from a partial build for a full build, but it must be a clean build to ensure batch jobs will work correctly.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s