How a add custom field as parameter while batch process

Hi Guys,

I added a date field for user input while batch process.

pastedimage1548243636019v1.pngpastedimage1548243678149v2.png

here is the sample code.

Step 1:

class DemoClass extends RunbaseBatch
{
TransDate transDate;

DialogField fieldTransDate;
DialogRunbase dlg;

#define.CurrentVersion(1)

#localmacro.CurrentList
transDate
#endmacro

}

Step 2:

override the method dialog

protected Object dialog(DialogRunbase dialog, boolean forceOnClient)
{

;

dlg = super();
fieldTransDate = dlg.addField(typeId(TransDate));
return dlg;

}

Step 3:

override the method getFromDialog method.

public boolean getFromDialog()
{
boolean ret;
;

ret = super();
transDate = fieldTransDate.value();
this.caption();
return ret;

}

Your solution lacks pack() and unpack() methods. Note that you wouldn’t have to build the dialog and handle serialization (pack()) and deserialization (unpack()) if you used the newer framework for this purpose - SysOperation.