hi, please find below my situation:
On the create Purchase Order button of "Release Approved purchase requisition" form, i need to open a new dialog form "MS_PrFillContractNumber"to let the user fill a new customized field "contract number" for the selected records in the current form.
The menu item of the Create PO button refers to a class named "RequisitionReleaseStrategy"; so in the run() function of this class i insert this line "this.FillContract();" FillContract() is a new function containing the below code;
private void FillContract()
{
FormRun formRun;
Args args = new Args();
args.name(formStr(MS_PrFillContractNumber));
args.caller(this);
formRun = classfactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.wait();
//new MenuFunction(menuitemDisplayStr(MS_PrFillContractNumber),MenuItemType::Display).run(args);
}
the datasource of new form "MS_PrFillContractNumber" is the PurchReqLine table, i have added a new grid in the design containg 3 columns (PurchReqlineID, item Number, contract number); and below is the code of init() function:
caller = element.args().caller();
if (!caller)
{
throw error(strfmt("@SYS22678",element.name()));
}
super();
i have tried several codes in the init function; the problem is that the new form is always showing all the records.
can anyone give me a detailed solution to show only the selected records in the parent form.
you help is very appreciated