Skip to main content

Notifications

Announcements

No record found.

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

Lookup with group by on reference group

Posted on by 11,873

I have a reference group and I use group by field in its lookup reference method , the issue is that we I apply (addGroupByField) to lookup query , the lookup values are correct  but when I select the value , the selected value does not appear in reference group control, when I remove the group by the lookup values have duplicated values and selected value retrieved in reference group , how can I apply group by to lookup of reference group ?

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: Lookup with group by on reference group

    Which version of AX are you using?

    A group will contain several records. Which record ID do you want to select? If you know that, didn't you forget to implement this logic (by using an aggregation function, for example)? If you don't know which record should be selected, forget code for a moment and think about the business scenario. You may even find that the whole thing doesn't make a good sense.

    If you're saying that your query will returned the same record multiple times, shouldn't you correct this bug? It would likely mean that you're using an inner or outer join where you want exists join, or something like that.

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,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans