Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Delete Audit history by entity?

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

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

    Please check below blog

    nishantrana.me/.../

  • Suggested answer
    bter3489 Profile Picture
    bter3489 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
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 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.

  • chakkay Profile Picture
    chakkay 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?

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 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
    chakkay 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
    Johnny Gong Profile Picture
    Johnny Gong 6,482 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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans