
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 ?
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.