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)

Delete Audit history by entity?

(0) ShareShare
ReportReport
Posted on by 594

Hi CRM World,

Can we delete the audit history by entity? I searched CRM SDK and found only one method: 

DeleteAuditDataRequest which is used to delete all audit history inside a partition (a quarter of year as per CRM) before a 
a given end date.

I am exploring if we have any other method to delete audit history only for a particular entity? Or is there any other method
to achieve this?

I am on Dynamics 365 Online.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Johnny Gong Profile Picture
    6,482 Moderator on at
    RE: Delete Audit history by entity?

    Hi,

    As I check from the official document and all the D365 community, the DeleteAuditDataRequest is used to delete all audit data records up until a specified end date. There's no method update about the Audit history deletion by entity in D365 Official Document as follow:

    https://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.deleteauditdatarequest.aspx

    In addition , there's also a similar solved thread for your reference. 

    https://community.dynamics.com/crm/f/117/t/236432  

    In another way , you could store D365 Audit Log offline by extracting the log details from 3rd party toolkit like the SSIS Integration Toolkit for Microsoft Dynamics 365 which works both on premise and online. Then you could delete all these audit logs to free space.

    The following Toolkit details are for your reference:
    Download Linkage: http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-365/download  
    Video of Getting Started with SSIS Integration Toolkit for Microsoft Dynamics 365/CRM: https://www.youtube.com/watch?v=5Sr2UrgACGY 

     lalal.PNG

    Hope it helps.

    Regards,

    Johnny

  • chakkay Profile Picture
    594 on at
    RE: Delete Audit history by entity?

    Hi Johny,

    That was great explanation. Thanks for it. I have one last question.

    Suppose say i extracted contact entity related audit logs data using SSIS onto my personal SQL DB and deleted the whole audit log in CRM Online. Is it possible for me to re-import back the audit logs data into CRM Online? Atleast this way i could achieve my requirement.

    Thanks

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    33,626 on at
    RE: Delete Audit history by entity?

    Hi,

    you cant import back after deleted the audit log.

    community.dynamics.com/.../246295

  • chakkay Profile Picture
    594 on at
    RE: Delete Audit history by entity?

    Hi Wei,

    Thats a very good info man. Thanks for sharing. But the community post says we can import back the audit history into a custom entity or to another custom application. After importing like this, when we selected a contact record and clicked drop down (to open associated records) and clicked auditing entity associated with that contact record, we no longer see any audit history logs related to that contact.

    So we have to browse back to custom entity where my audit logs are imported, search a contact by its name, find its related audit history and dig deeper into its audit.

    But i am looking for a solution to attach the audit history to that particular contact record so that whenever we want, we can open the contact drop down, click auditing and view contacts audit history instead of browsing to custom entity.

    IS IT POSSIBLE?

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,626 on at
    RE: Delete Audit history by entity?

    Hi ,

    I believed the custom entity means, they suggested to store the audit history into custom entity as a record instead of auditing, because we cant import audit.

  • Suggested answer
    bter3489 Profile Picture
    10 on at
    RE: Delete Audit history by entity?
    [quote user="Chakka Yashwanth"]

    Hi CRM World,

    Can we delete the audit history by entity? I searched CRM SDK and found only one method: 

    DeleteAuditDataRequest which is used to delete all audit history inside a partition (a quarter of year as per CRM) before a 
    a given end date.

    I am exploring if we have any other method to delete audit history only for a particular entity? Or is there any other method
    to achieve this?

    I am on Dynamics 365 Online.
    [/quote]

    This is now possible using the admin center you can select which tables to delete the audit logs for.Delete-Audit-Logs.png

  • Suggested answer
    ankit_singhal Profile Picture
    560 on at
    RE: Delete Audit history by entity?

    Please check below blog

    nishantrana.me/.../

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
UllrSki Profile Picture

UllrSki 2

#3
SC-08081331-0 Profile Picture

SC-08081331-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans