Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

How to lookup fields filter in the ax 2012

Posted on by 1,213

Hi guys,

i have a vendor lookup in the Account no and Name but, name is display methods we can't filter records in the lookup Ex Ctrl+G

what to be done?

    SysTableLookup Lookup;
    QueryBuildDataSource qbds;
    Query query = new Query();

    Lookup = SysTableLookup::newParameters(tableNum(VendTable), _control);

    Lookup.addLookupField(fieldNum(VendTable,AccountNum));
    Lookup.addLookupMethod('name');
    qbds = query.addDataSource(tableNum(VendTable));
    //qbds.addRange(fieldNum(VendTable,Country)).value(queryValue(country));

    Lookup.parmQuery(query);
    Lookup.performFormLookup();

  • Verified answer
    Blue Wang Profile Picture
    Blue Wang on at
    RE: How to lookup fields filter in the ax 2012

    HI Riyas,

    I think you can do this by writing a method on VendTable and then using addLookupMethod.

    sysTableLookup.addLookupMethod(tableMethodStr(VendTable, yourmethos));

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans