Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How to make a drop-down grid selection?

(0) ShareShare
ReportReport
Posted on by 135

Hello sirs, I want to imitate this dropdown box with a grid selection
PICS.png

Can anyone give me an idea how to do this?

Thanks again.

*This post is locked for comments

  • Sean The Michael Profile Picture
    Sean The Michael 135 on at
    RE: How to make a drop-down grid selection?

    Thank you for the suggestions everybody, it worked.

  • Suggested answer
    Israel Gonzalez Profile Picture
    Israel Gonzalez 725 on at
    RE: How to make a drop-down grid selection?

    Just add the field that you want to drop down and set EDT (VendAccount) and that's it.

  • Verified answer
    AXTechie2120 Profile Picture
    AXTechie2120 560 on at
    RE: How to make a drop-down grid selection?

    Hi,

    I think the fields vendaccountnum and name are from same tables .

    Please try the below code.

    Please create a stringedit field in your form and overwrite the lookup method for that field and you will able to get the desired output.

    public void lookup()

    {

    Query query = new Query();

    QueryBuildDataSource qbds;

    QueryBuildDataSource QbdsJoin;

    SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(PurchTable), this);

    ;

    super();

    qbds = query.addDataSource(tableNum(PurchTable));

    sysTableLookup.parmQuery(query);

    sysTableLookup.addLookupfield(fieldNum(PurchTable, OrderAccount));

    sysTableLookup.addLookupfield(fieldNum(PurchTable, PurchName));

    sysTableLookup.performFormLookup();

    }

    Please mark the answer verified if found useful.

    Regards,

  • Verified answer
    AXTechie2120 Profile Picture
    AXTechie2120 560 on at
    RE: How to make a drop-down grid selection?

    Hi,

    public void lookup()

    {

    //super();

    // Declaration

    Query   LookupQuery    =   new Query();

    QueryBuildDataSource     LookupQueryBuildDataSource;

    QueryBuildRange                  LookupQueryBuildRange;

    SysTableLookup CustomSysTableLookup =       SysTableLookup::newParameters(tableNum(CustTable), this);

    ;

    // Add fields that you want in Lookups

    CustomSysTableLookup.addLookupField(fieldNum(CustTable, AccountNum));

    CustomSysTableLookup.addLookupField(fieldNum(CustTable,Currency));

    LookupQueryBuildDataSource =

    LookupQuery.addDataSource(tableNum(CustTable));

    LookupQueryBuildRange=

    LookupQueryBuildDataSource.addRange(fieldNum(CustTable,AccountNum));

    //LookupQueryBuildRange.value(queryValue(NOYESCOMBO::Yes));

    // Execute the Query

    CustomSysTableLookup.parmQuery(LookupQuery);

    CustomSysTableLookup.performFormLookup();

    }

    Please try the above code.

    Any modify according to your needs.

    Regards,

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,605 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans