Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Multiple lookup selection on a grid field in AX

Posted on by 572

Hi Experts,

I have a requirements that I should have a dropdown field in a form grid and the user should be able to select multiple records. specifically the dropdown should be the production orders list and if the user select 2 or 3 production orders together and press OK the sum of quantity produced for those orders should appear in the field. Is this possible if I create a lookup form,  call this form as a look up for the field and add code to calculate the sum of quantities in the clicked method of OK button ? or I must go for SysLookupMultiSelectGrid class.

Thanks in advance. 

  • Suggested answer
    ergun sahin Profile Picture
    ergun sahin 8,812 Super User 2024 Season 1 on at
    RE: Multiple lookup selection on a grid field in AX

    Sorry, they don't differ much for me, but you're right, I misled you.

    I did not review the example below in detail, but if I'm not mistaken, the structure you're looking for must be something similar (see the last sections).

    I'll share a better example when I have time

    dynamicaxassist.blogspot.com/.../using-multi-select-lookup-on-string.html

  • D365  beginner Profile Picture
    D365 beginner 572 on at
    RE: Multiple lookup selection on a grid field in AX

    Hi Ergun,

    Thanks for your response. Kindly note that the sample you have provided will not work with a grid field control. Is there any sample If it is possible to get it done by custom lookup form ?

  • Suggested answer
    ergun sahin Profile Picture
    ergun sahin 8,812 Super User 2024 Season 1 on at
    RE: Multiple lookup selection on a grid field in AX

    It is possible in both ways. If you do a custom lookup form, you have to pass the value you calculated back to the caller.

    When you use SysLookupMultiSelectGrid, you need to fill the RecId list into the container and calculate the sum in the loop.

    yasirnedian.blogspot.com/.../how-to-select-multiple-selected-values.html

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