Customer Engagement & Dynamics CRM Forum

 View Only
  • 1.  Deleting specific Audit Logs

    SILVER CONTRIBUTOR
    Posted Mar 28, 2022 04:34 PM
    I may be mistaken but I could swear we used to be able to delete specific audit logs for a specific time period.

    We need to remove the audit logs on one table and for a certain timeframe. Is this no longer possible? It looks as though you can either A. delete logs 250 records at a time (that definitely won't work for us), or B. delete logs by table (all time periods) or C. by time period but for all tables. 

    Seems odd MSFT would not have an option to narrow down which logs/tables, and for what time period exactly you wish to permanently remove the history. 

    Thanks
    Keith

    ------------------------------
    keith courtemanche
    FCS
    ------------------------------


  • 2.  RE: Deleting specific Audit Logs

    TOP CONTRIBUTOR
    Posted Mar 29, 2022 06:55 PM
    @keith courtemanche
    Yes, it would be great to be able to have a more robust tool for clearing audit history.
    You could try using a data integration tool like SmartConnect or KingswaySoft ​to delete unwanted records in the AuditBase table. Limit to records where ObjectTypeCode = the entity you wish to delete audit records for and CreatedOn fits your desired date range.

    To get the desired ObjectTypeCode(s), run this query on your CRM database:
    select Name, ObjectTypeCode from EntityView order by ObjectTypeCode

    or use these steps to find the code on one entity: Find an Entity Object Type Code

    ------------------------------
    Allison Briden
    Business Systems Analyst
    Energy Trust of Oregon
    Portland OR
    ------------------------------



  • 3.  RE: Deleting specific Audit Logs

    SILVER CONTRIBUTOR
    Posted Mar 30, 2022 12:12 PM
    Hi Allison,

    It doesn't surprise me MSFT doesn't have a good tool for this. Your post does help as it gives me other avenues to pursue. 

    Thanks for the response,
    Keith

    ------------------------------
    keith courtemanche
    FCS
    ------------------------------



  • 4.  RE: Deleting specific Audit Logs

    SILVER CONTRIBUTOR
    Posted Mar 30, 2022 12:37 PM
    Edited by Eugene Hoang Mar 30, 2022 12:38 PM
    In the past, you were able to delete audit logs per a quarter or row by row. I don't recall an easy way to delete per table/entity. However, there is a recent roll out and transition to a new audit log storage infrastructure which will allow targeting specific tables/entities. However, I believe this is only available on D365 Online. The new features are robust and definitely needed! Here's the article to reference with a screenshot: https://docs.microsoft.com/en-us/power-platform/admin/free-storage-space#reduce-log-storage


    ------------------------------
    Eugene Hoang
    Kavo Kerr Group
    Brea CA
    ------------------------------



  • 5.  RE: Deleting specific Audit Logs

    SILVER CONTRIBUTOR
    Posted Mar 30, 2022 01:41 PM
    Thanks Eugene. I'm just trying to delete specific logs for a specified time period and the new way MSFT has for handling this doesn't allow for this. It appears I can delete logs for an entire table/entity or all logs for a specified period of time. Neither works for me. Wish the was a XRM tool for this. Maybe someone will create one.

    ------------------------------
    keith courtemanche
    FCS
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role