Here is the minimum minimum required to create a batch job in AX:
Create a batch job by creating a new class that extends the RunBaseBatch class:
class MyBatchJob extends RunBaseBatch { }
Implement the abstract pack() method:
public container pack() { return connull(); }
Implement the abstract unpack() method:
public boolean unpack(container packedClass) { return true; }
Override the run() method with the code you want to execute:
public void run() { ; ... info("MyBatchJob completed"); }
Add the static main method to your class to instantiate your class and call the standard RunBaseBatch dialog:
static void main(Args _args) { MyBatchJob myBatchJob = new MyBatchJob(); ; if(myBatchJob.prompt()) { myBatchJob.run(); } }
If you want your batch job to contain a description in the list of lots, add the static description method to your class:
server client static public ClassDescription description() { return "My batch job"; }
source share