Sunday, 12 January 2014

RunBaseBatch in ax 2009

RunBaseBatch:-

New: Create a new instance of the class, called when executed in batch

Pack: Class variables are persisted by using a local macro, called when the dialog box is closed by selecting “OK”

UnPack: The Class variables in the local macro are re- instantiated. The unpack method is called before the run. Called when executed in batch.

Dialog: Controls are added to the dialog box and the values of the controls are set by the values of their corresponding class variables.

getFormdailog: The values of the class variables are assigned by the values of the controls that have been added to the dialog box .

Validate: the input parameters can be validated, if the input are invalid, an info log can be displayed so the user can take action.

Run:The central method of the class . Called when executed in batch

InitParmDefault: called when the unpack method return false no usage data found ,class variables that are in the macro list should be initialized in the init parm default method.

QueryRun : if the class uses a query , this mehod should return a queryrun object

CanGOBatchJournal: Indicates if the class (job) can be included in a batch journal Defult is false.

CanGoBatch: Indicates if the class can be executed in batch. The framework adds the “Batch” tab page to the dialog if this method return true. Default is true.

RunImpersonated: Indicates if the job should be run using the submitting user’s account or the batch user’s account. The default is to use batch user’s account. If true is returned , the batch server will execute the job using the X++ “RunAs” Statement version 4 and later . Default is false.

Description(Static)
   Return the description of the (base)class and will be displayed as the description in the batch list and determines the title of the dialog.


Caption: The description of the class can be overridden by returning the descrition of the child class. It will be displayed as the description in the batch list and determines the title of the dialog

No comments:

Post a Comment