Thursday, 12 May 2011

Send/add batch job through code on Dynamics AX

To add job into 'Batch job' using X++ code, just skip the .prompt() method.
All you need is:
- A class that extends RunBaseBatch
- A method that add the job into batch job


classdeclaration SendBatchJob extends RunBaseBatch

//The method that calls to add the job
static void addBatchJob()
    SendBatchJob    sendBatch;

    sendBatch = new SendBatchJob();

//The method that actually add the job into 'Batch job'
void sendToBatch()
    this.batchInfo(); //Initialize

No comments:

Post a Comment