Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to clear data from a custom table?

(0) ShareShare
ReportReport
Posted on by 479

Is there a way to clear all data/rows from a table but still keeping the fields?

  • Verified answer
    Rushiraj Suthar Profile Picture
    Rushiraj Suthar 62 on at
    RE: How to clear data from a custom table?

    Hi, 

    If you want to clear your custom table data permanently,

    then use

    TablenameVariable.DeleteAll();

    Please Verify the answer and Click on Yes if my answer will help full to you. 

    Thanks.

    Rushiraj Suthar

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 78,032 Super User 2025 Season 1 on at
    RE: How to clear data from a custom table?

    Hi, I believe the following post can give you some hints.

    https://navinsights.net/2020/10/27/4-ways-to-delete-records-from-a-table/

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 997 Moderator on at
    RE: How to clear data from a custom table?

    If you have a list view of them you can just mark them and delete them.

    If there is a lot of data in the table i would have my developer write some code to delete the necessary records.

  • Suggested answer
    MahGah Profile Picture
    MahGah 15,435 on at
    RE: How to clear data from a custom table?

    Test this in Sandbox first and test since this is not reversible. 

    in configuration package select that table then Export Excel. Then delete all data (except header ). Then select Delete Table Records Before Processing and upload the Excel file and apply data. 

    pastedimage1654807262289v1.png

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans