For filtering the records in a form based on the menuitem caller we have to follow following steps
For Example ;
we have ledgerJournalTable form which is presented in the modules like AP, AR,GL
but if we observe that form, whenever we open from one module it will show only respected details
because ledgerjournaltable form called from the respected menuitems.
if u observe in the menuitem properties the specifed 2 proporties
based on this properties our form will be called.
to know the initilizing process
Check
\Forms\LedgerJournalTable\Methods\init
go to line ; journalFormTable = new LedgerJournalFormTable(element);
Then Go to \Classes\LedgerJournalFormTable which is extend from JournalformTable class
and check \Classes\JournalFormTable\initJournalTypeFromCaller.
Now U can Find the entire proccess
same I have a requirment to apply the entire process in my customized tables
for that i have created one form and a base enum and MenuItems as below
in the form datasource init method add below code for filteration
public void init()
{
//anytype LedgerJournalType;
;
super();
if (element.args().parmEnumType())
{
LedgerJournalType = element.args().parmEnum();
}
if (LedgerJournalType)///If found
{
this.query().dataSourceTable(tableNum(DaxLedgerJournal)).addRange(fieldnum(DaxLedgerJournal,DaxJournalType)).value(QueryValue(LedgerJournalType));
}
}
No comments:
Post a Comment