Hi all,
Thanks for reading my question.
I want to create lookup form lookup all “LedgerAccount” in “General ledger - Common - TrialBalance”.
I tried but my code show all value in table Main Account, how can i make value show only Account in “LedgerAccount”
Thanks very much !
(Below is my lookup code)
public void mainAccountLookup(FormStringControl _control)
{
Query query = new Query();
QueryBuildDataSource qbds;
QueryBuildRange qbr;
SysTableLookup sysTableLookup;
container con;
qbds=query.addDataSource(tableNum(MAINACCOUNT));
qbr = qbds.addRange(fieldNum(MAINACCOUNT, MainAccountId));
sysTableLookup = SysTableLookup::newParameters(tableNum(MAINACCOUNT), _control);
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldNum(MAINACCOUNT, MainAccountId));
sysTableLookup.addLookupfield(fieldNum(MAINACCOUNT, Name));
sysTableLookup.performFormLookup();
}