get the look up of offset accounts.
public void lookup()
{
Query query = new Query();
QueryBuildDataSource qbds;
SysTableLookup sysTableLookup;
QueryBuildRange qbr;
sysTableLookup = SysTableLookup::newParameters(tablenum(MainAccount), this);
qbds = query.addDataSource(tableNum(MainAccount));
sysTableLookup.addLookupfield(fieldnum(MainAccount, MainAccountId), true); //
sysTableLookup.addLookupfield(fieldnum(MainAccount, Name));
qbr = qbds.addRange(fieldNum(MainAccount,LedgerChartOfAccounts));
qbr.value(queryValue(ledgerChartOfAccounts::current()));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
No comments:
Post a Comment