web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

View in D365 - is it supported to use distinct=true?

(0) ShareShare
ReportReport
Posted on by 886

Hi,

I have tried to create a view to only show accounts with the same name once. (I wan't to show sub-accounts in a subgrid view in accouns - however only show them once if they have the same name). I can get it working in XRMtoolsbox. But not in the advanced view in D365. It's like it's changing to distinct=true to distinct=false on the fly?

Anybody knows if it's possible to create view in CRM with the distinct=true? To only show records with the same name once?

I have the same question (0)
  • Suggested answer
    Nya Profile Picture
    29,060 on at

    Hi,

    Since you can get it working in XrmToolBox, why not create the view with XrmToolBox directly?

    Please try to create a view with FetchXML builder in XrmToolBox.

    For steps of creation, please refer to my answer in the following issue:

    (+) Add several account IDs as a filter - Dynamics 365 Marketing Forum Community Forum

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Or Enable editable grid for a home page & use the group by option.

    Thanks

    Regards,

    Abdul Wahab

  • rskadk1 Profile Picture
    886 on at

    Nya,

    I have also tried that. The problem is that the distinct true is not working in Dynamics. It's like its set to false on the fly.

    if you have the time you can try to replicate it. Either use it directly in a view below on accounts or in a subgrid

    Is there any limitation that it can only be used on certain entitys?

  • rskadk1 Profile Picture
    886 on at

    Abdul Wahab,

    Group by is not usefull as the user will have to select what field to group by. Further more no data can be shown in the "grouped" row. It will not be a simple view for the user.

  • rskadk1 Profile Picture
    886 on at

    Also my fetchxml (however from quote - I have 4 quotes related to an associatedserviceaccount).

    This is the xml

    Also my fetchxml (however from quote - I have 4 quotes related to an associatedserviceaccount).

    This is the xml

    <fetch distinct="true" >
      <entity name="quote" >
        <attribute name="cus1_associatedserviceaccount" alias="linkedaccount" />
        <order attribute="cus1_associatedserviceaccount" descending="true" />
        <filter type="and" >
          <condition attribute="cus1_associatedserviceaccount" operator="eq" value="093a1cca-8beb-eb11-bacb-0022489ad4de" />
        </filter>
        <attribute name="quoteid" />
      </entity>
    </fetch>

    giving this result

    pastedimage1629809201438v1.png

    I know that it's due the (quoteid) that was inserted automatically (I didnt insert it when i created the view in dynamics). I can remove it from the xml

    <fetch distinct="true" >
      <entity name="quote" >
        <attribute name="cus1_associatedserviceaccount" alias="linkedaccount" />
        <order attribute="cus1_associatedserviceaccount" descending="true" />
        <filter type="and" >
          <condition attribute="cus1_associatedserviceaccount" operator="eq" value="093a1cca-8beb-eb11-bacb-0022489ad4de" />
        </filter>
      </entity>
    </fetch>

    then i get this result

    pastedimage1629809329376v2.png

    However i cannot save it to dynamics

    pastedimage1629809400068v3.png

    I can then just export the solution from d365 and edit it manually and import it again (This was what i did initially). However it don't work. I get 4 results.

    So my initial conclusion is that distinct = true does not work in d365!

    pastedimage1629809776036v4.png

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    so why do not you use IFrame or HTML? Use them & do whatever you want.

  • Nya Profile Picture
    29,060 on at

    Hi,

    Could I understand that as you need to list accounts that have at least one quote?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 96 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans