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 :
Microsoft Dynamics AX (Archive)
Unanswered

Lookup with group by on reference group

(0) ShareShare
ReportReport
Posted on by 11,871

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 ?

I have the same question (0)
  • Martin Dráb Profile Picture
    225,155 Moderator 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

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard > 🔒Ι Microsoft Dynamics AX (Archived)

Featured topics

Product updates

Dynamics 365 release plans