class DDDInventJournalNameFormEventHandler
{
[FormControlEventHandler(formControlStr(InventJournalName, DDDBudget_DDDDefaultGeneralJournal), FormControlEventType::Lookup),
SuppressBPWarning('BPParameterNotUsed', 'False positive')]
public static void DDDBudget_DDDDefaultGeneralJournal_OnLookup(FormControl sender, FormControlEventArgs e)
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
SysTableLookup sysTableLookup;
sysTableLookup = SysTableLookup::newParameters(tableNum(LedgerJournalName), sender);
queryBuildDataSource = query.addDataSource(tableNum(LedgerJournalName));
queryBuildDataSource.addRange(fieldNum(LedgerJournalName, JournalType)).value(strFmt('%1',any2int(LedgerJournalType::Daily)));
queryBuildDataSource.addRange(fieldNum(LedgerJournalName, DDDProcessBudget)).value(strFmt('%1',any2int(NoYes::Yes)));
sysTableLookup.addLookupField(fieldNum(LedgerJournalName, JournalName), true);
sysTableLookup.addLookupField(fieldNum(LedgerJournalName, Name));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
}
No comments:
Post a Comment