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...
Answered

Adding custom table to retention policy list page

(7) ShareShare
ReportReport
Posted on by 62
Greetings!
 
I have a custom table (ID=60100) that the client has asked we add to the retention policy list page (ID=3903).  We have added the table via the Reten. Pol. Allowed Tables codeunit via the AddAllowedTable method but the table does not appear in the list page.  What are we doing wrong?
 
The code snippet is below.  Custom table 60100 is HSCI01Change Log Entry.  We have tried the method call with and without specifying the date field that triggers data retention.
 
var
        bRetVal: boolean;
        oRetentionPolicy: codeunit "Reten. Pol. Allowed Tables";
        oChangeLogEntry: record "HSCI01Change Log Entry";
    begin
        bRetVal := oRetentionPolicy.AddAllowedTable(Database::"HSCI01Change Log Entry", oChangeLogEntry.FieldNo(SystemCreatedAt));
    end;
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at
    Hi, Please refer to the Microsoft standard document below.
    Thanks.
    ZHU
  • Verified answer
    OussamaSabbouh Profile Picture
    12,766 Super User 2026 Season 1 on at
    Hello,
     
    Call AddAllowedTable inside an Install codeunit (OnInstallAppPerCompany), then reinstall the app.
    Your table will then appear in the Table ID lookup when creating a new retention policy, it won’t auto-add a row on the page.
     
    Regards,
    Oussama Sabbouh
  • WilliamSchroeder Profile Picture
    62 on at
    I think my issue is that the New button is not enabled on the Retention Policies page.  I am a delegated admin with SUPER rights...Is that why I cannot add a new table to the retention policy list?
     
  • 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.

    Include your extension in a retention policy (requires help from a developer):
    Clean Up Data with Retention Policies - Business Central | Microsoft Learn

    Dynamics 365 Business Central: creating retention policies from AL – Stefano Demiliani

    Best Regards
    Gerardo

  • Suggested answer
    Rishabh Kanaskar Profile Picture
    6,219 Super User 2026 Season 1 on at
    Hi,
     
    Delegated admins (even with SUPER permissions) cannot create or edit retention policies in Business Central Online. This is restricted to users who belong to the tenant where the environment resides and have the appropriate license.
    Delegated admin accounts are for partner administration and do not have full functional rights for features like retention policies.
     
    Thanks
    Rishabh

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