I create a class extended from RunBaseBatch to be used as batch tack. I go to System Administration > Inquiries > Batch Jobs to create new batch then click view tasks to add tasks when I entered the name of the created class to class name field in the grid I get the following error “The batch task you entered is not valid. Enter a different batch task”.
I try creating the batch by go to class directly select open then use batch tab to create batch and set recurrence. The batch is created, added to batch queue and performed successfully. When I check tasks related to this batch, I find the name of the class in the field class name.
Why I face such case ?
To be able to create a batch in this way, your class must override canGoBatchJournal() and let it return true.
It's not related to your question, but it's worth noting that you shouldn't implement batches by the RunBase framework since AX 2012. Use the SysOperation framework instead (which makes many things easier, e.g. you don't have to implement serialization by yourself anymore).
Martin "Goshoom" Dráb | Freelancer | Goshoom.NET Dev Blog
The method canGoBatchJournal is already overrite and return true since I use the class “Tutorial_RunbaseBatch” to create my new customized one.
Well, there are other conditions and I can say (without ever seeing your code) which exactly is violated.
First restart the client to clear client cache. If it doesn't help, simply debug the code (in Batch.className()) to find out which condition is failing.
By restarting the client, the problem is resolved.
Thank you very much.
When creating a batch via System Administration > Inquiries > Batch , its status is by default “withhold”, the status should be changes to “waiting” in order to be started, right?
Another question, the batches in AX are similar to windows services; they are running in the background, is it correct ?