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
    70 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
    82,747 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
    1,025 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
    15,443 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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 448 Super User 2025 Season 1

#2
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 358

#3
Mansi Soni Profile Picture

Mansi Soni 327

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans