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

Announcements

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,742 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,800 Super User 2026 Season 1 on at
    As mentioned there's no problem deleting them using a codeunit.
     
     
  • Suggested answer
    RockwithNav Profile Picture
    9,168 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
    27,054 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
    17,551 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
    101,995 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
    17,024 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,371 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,806 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,371

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans