web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Behind AX / AX 2012 - Send filter with ...

AX 2012 - Send filter with args

metin emre Profile Picture metin emre 502

 

If your filter just one record, you can run filter with args.record(). In the other case if you have to filter more than one record, you can't use record method. You can use InitialQueryParameter for this:

            Args                 args = new Args();
            MenuFunction         MenuFunction = new MenuFunction('LedgerJournalTable', MenuItemType::Display);
            Query                q = new Query();
            QueryBuildDataSource QBDS = q.addDataSource(tableNum(LedgerJournalTable));

            if (ABCRCreditTable.AccualJournalNum != "")
                QBDS.addRange(fieldNum(LedgerJournalTable,JournalNum)).value(ABCRCreditTable.AccualJournalNum);
            if (ABCRCreditTable.AccualJournalNum2 != "")
                QBDS.addRange(fieldNum(LedgerJournalTable,JournalNum)).value(ABCRCreditTable.AccualJournalNum2);

            args.initialQuery(InitialQueryParameter::createByQuery(q));
            args.caller(this);

            MenuFunction.run(args);  




This was originally posted here.

Comments

*This post is locked for comments