Pass multi
Line Record using Button
Form A Button clicked Method:void clicked()
{
int recordsCount;
SalesLine _salesLine;
container con;
Args args;
str multiSelectString;
args = new Args();
recordsCount = SalesLine_1_ds.recordsMarked().lastIndex(); // gets the total records selected
_salesLine = SalesLine_1_ds.getFirst(1);
while (_salesLine)
{
con = conIns(con, 1, _salesLine.RecId);
multiSelectString = con2Str(con, ",");
_salesLine = SalesLine_1_ds.getNext(); // moves to next record
}
args.parm(multiSelectString);
new MenuFunction(menuitemDisplayStr(GofyndSalesOrderError), MenuItemType::Display).run(args);
}
Form B Init Method:
public void init()
{
super();
multipleRecords = element.args().parm();
con = str2con(multipleRecords,",");
for(i = 1; i<= conLen(con);i++)
{
SalesLine_ds.query().dataSourceTable(Tablenum(SalesLine)).addRange(fieldNum(SalesLine,RecId)).value(SysQuery::value(conPeek(con,i)));
SalesLine_ds.query().dataSourceTable(tableNum(SalesLine)).addRange(fieldNum(SalesLine,S3_GofyndError)).value(sysquery::valueNotEmptyString());
}
}
No comments:
Post a Comment