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 CRM (Archived)

how to retrieve distinct records with latest updated time in fetchxml

(0) ShareShare
ReportReport
Posted on by

Dear All,

  I'm very new to MS CRM. and i need to retrieve set of distinct records with latest updated time from CRM table. For example, the table has below status. i need to bring only distinct values with latest record with updated time.

S.NO    Profile                                                                Gate        Created Time

1         5e8d5c84-9e8a-44d5-80f3-7ec149d8323f         Gate1     6/12/2017 06:02:35 pm

2         5e8d5c84-9e8a-44d5-80f3-7ec149d8323f         Gate3     6/12/2017 06:08:40 pm

3         5e8d5c84-9e8a-44d5-80f3-7ec149d8323f         Gate2     6/12/2017 06:05:35 pm

4        07241f5a-ea22-4df6-a406-2d883af30bd1         Gate1      6/12/2017 06:02:38 pm

5       07241f5a-ea22-4df6-a406-2d883af30bd1           Gate4     6/12/2017 07:05:02 pm

above kind of records would be updated from user request in CRM table. we need to fetch distinct values with recently updated time.

Please help me on this to get retrieve in the easiest way rather than doing multiple List<string>. it's urgent!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: how to retrieve distinct records with latest updated time in fetchxml

    Hello,

    The easiest way for you is to use FetchXml and aggregates - msdn.microsoft.com/.../gg309565.aspx

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans