By this we can use same MenuItem at different place and for different data source.
---------------------------------------------------------------------------
Public static void main(Args _args)
{
RetailStatementTable retailStatementTable;
RetailStatementLine retailStatementLine;
RetailStatementId StatementID;
RetailCountedAmountUpdate RetailCountedAmountUpdate = new RetailCountedAmountUpdate();
;
switch (_args.dataset())
{
case tablenum(RetailStatementTable) :
retailStatementTable = _args.record();
StatementID = retailStatementTable.statementId;
break;
case tablenum(RetailStatementLine) :
retailStatementLine = _args.record();
StatementID = retailStatementLine.statementId;
break;
}
RetailCountedAmountUpdate.run(StatementID);
}
---------------------------------------------------------------------------
Public static void main(Args _args)
{
RetailStatementTable retailStatementTable;
RetailStatementLine retailStatementLine;
RetailStatementId StatementID;
RetailCountedAmountUpdate RetailCountedAmountUpdate = new RetailCountedAmountUpdate();
;
switch (_args.dataset())
{
case tablenum(RetailStatementTable) :
retailStatementTable = _args.record();
StatementID = retailStatementTable.statementId;
break;
case tablenum(RetailStatementLine) :
retailStatementLine = _args.record();
StatementID = retailStatementLine.statementId;
break;
}
RetailCountedAmountUpdate.run(StatementID);
}
No comments:
Post a Comment