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 :
Small and medium business | Business Central, N...
Suggested answer

Delete Change Log Entry without using Retention Policies

(7) ShareShare
ReportReport
Posted on by 102
Hello,
 
Could I use Code Unit to delete some record in Change Log Entry Table (405) directly without Retention Policies function ?
 
If it is possible, are there any notes when deleting directly record in Change Log Entry table ?
 
Thank you.
I have the same question (0)
  • Suggested answer
    Pallavi Phade Profile Picture
    3,565 on at
    Delete Change Log Entry without using Retention Policies
    Namaste @Peter Nguyen
     
    You can delete change log entries , but if records are huge then it will be get into deadlock . Would suggest deletion in batches .
     
     
    Warm Regards
    Pallavi Phade
  • Peter Nguyen Profile Picture
    102 on at
    Delete Change Log Entry without using Retention Policies
    Thank you 
    I will set filter when delete the records.
  • Suggested answer
    Valentin Castravet Profile Picture
    31,103 Super User 2025 Season 2 on at
    Delete Change Log Entry without using Retention Policies
    As mentioned there's no problem deleting them using a codeunit.
     
     
  • Suggested answer
    RockwithNav Profile Picture
    8,520 Super User 2025 Season 2 on at
    Delete Change Log Entry without using Retention Policies
    Any specific reason to ignore Retention Policies?
    You can delete there's no any linking for change log so no complain from system side.
    On NAV 2013 version's I have used SQL to delete change log on a strict filter basis.
  • Gerardo Rentería García Profile Picture
    24,814 Most Valuable Professional on at
    Delete Change Log Entry without using Retention Policies

    Hi, good day
    I hope this can help you, and give you some hints.

    Business Central 2025 wave 2 (BC27): Truncating table data with new AL method (procedure Truncate) | Dynamics 365 Lab

    Best Regards
    Gerardo

  • Suggested answer
    OussamaSabbouh Profile Picture
    4,242 on at
    Delete Change Log Entry without using Retention Policies
    Hello,
     
    Yes, you can delete Change Log Entries (table 405) with your own codeunit.
    BC doesn’t block it.
     
    But:
     
    It bypasses Retention Policies and audit logging.
     
    Only delete from table 405, never from the Change Log Setup tables (402–404).
     
    Do it in batches for performance if the table is large.
     
     
    So: technically allowed, but use carefully.
     
    Regards,
    Oussama Sabbouh
  • Suggested answer
    YUN ZHU Profile Picture
    95,075 Super User 2025 Season 2 on at
    Delete Change Log Entry without using Retention Policies
    Hi, No problem, even posted data can be deleted through Codeunit.
    And hope the following can give you some hints.
    Business Central 2021 wave 2 (BC19): Data archive extension (Data Archive List page)
     
    Thanks.
    ZHU
  • Suggested answer
    Jainam M. Kothari Profile Picture
    15,608 Super User 2025 Season 2 on at
    Delete Change Log Entry without using Retention Policies
    Hello,
     
    Yes, you can delete records from the Change Log Entry table (405) directly using AL code in a Codeunit.
     
    Direct deletion can impact compliance and auditing, cause performance issues if done in bulk, and should only be performed with proper permissions and after taking a backup. It’s best to apply filters (e.g., date range, Table ID) and delete in batches to avoid locking

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,888

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 3,386 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 2,041 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans