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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Query leads with last Owner filter? Audit entity?

(0) ShareShare
ReportReport
Posted on by 8,270

Hi guys,

I need to query all leads that had an specific Owner (now has changed) but I have no idea how to query that Audit entity, do you guys have any samples or code please?

Regards,

Raúl

*This post is locked for comments

I have the same question (0)
  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Raul

    Seems you need to use odata or fetch xml match with the audit history entity.

    If not too late now I think you better create your own transaction history to track the owner easy to query since you are using crm online.

    Thanks.

  • RaulOcana Profile Picture
    8,270 on at

    Hi Aileen,

    Well I asked this because I have these 2 crm users that claim that their leads disappeared; now I need to find them to show them what they did wrong.

    But I need to filter by the last user of the record, not the current one :S

    Regards,

    Raúl

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    You can only query the audit entity for the transaction type, record and user - you can't query based on the attribute that was updated.

    It sounds like you need to first establish what the query that you need is. You can easily create a filter on the Audit Summary in the UI by Transaction type, entity type and date range - so this might be enough to give you the information you need. You simply need to navigate to Settings->Auditing->Audit Summary Report and click on the the 'funnel' filter icon. This gives you drop downs on each column to specify your filter.

    If you need to start looking at actual attribute changes you can use the SDK to query this - see msdn.microsoft.com/.../gg309735.aspx

    Hope this helps,

    Scott

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

News and Announcements

Season of Giving Solutions is Here!

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans