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

Announcements

No record found.

News and Announcements icon
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 125
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
    5,420 Super User 2026 Season 1 on at
    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
    125 on at
    Thank you 
    I will set filter when delete the records.
  • Suggested answer
    Valentin Castravet Profile Picture
    32,157 Super User 2026 Season 1 on at
    As mentioned there's no problem deleting them using a codeunit.
     
     
  • Suggested answer
    RockwithNav Profile Picture
    8,941 Super User 2026 Season 1 on at
    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
    25,555 Most Valuable Professional on at

    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
    12,808 Super User 2026 Season 1 on at
    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
    99,055 Super User 2026 Season 1 on at
    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,732 Super User 2026 Season 1 on at
    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans