Batch Processing Classes [AX 2012]
Updated: February 14, 2012
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Implement classes by using the batch processing system, and by extending the RunBase and the RunBaseBatch classes.
Remove the Recurrence button from the Batch processing dialog by using the Args::parmEnum method. For more information, see the procedure later in this topic.
It is recommended that you designate a class to run as a server-bound batch job. Server-bound batch jobs are more secure than jobs that are not server-bound batch for the following reasons:
-
Create a class that extends the RunBaseBatch class.
-
Override the RunBaseBatch.runsImpersonated method to return a value of true, as shown in the following example.
public boolean runsImpersonated() { return true; } -
Confirm that the class calls only the following Info and Global class methods:
-
Info.line
-
Info.num
The Info.line and Info.num methods are inherited from the xInfo class.
When you implement a class by using the batch processing system, call the Args.parmEnum method, and pass the NoYes::Yes system enumeration value to remove the Recurrence button.
The NoYes system enumeration determines whether the recurrence button is removed from the batch processing dialog. The default value is NoYes::No.
In the following code example, the InventTransferMultiShip class is implemented. The BatchDialog::main method creates the Batch processing dialog.
static void noRecurrenceButton(Args _args)
{
Args a;
InventTransferMultiShip inventTransferMultiShip;
;
a = new Args();
inventTransferMultiShip = InventTransferMultiShip::construct();
a.caller(inventTransferMultiShip);
a.parmEnum(NoYes::Yes);
BatchDialog::main(a);
}
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.