Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

microsoft dynamics nav 2013 r2

Posted on by Microsoft Employee

Hi,

Please suggest me how to delete data in microsoft dynamics nav 2013 r2.

*This post is locked for comments

  • Suggested answer
    Alex A Profile Picture
    Alex A 2,348 on at
    RE: microsoft dynamics nav 2013 r2

    Caution: This response is only to be used by an experienced Database Administrator!

    To delete all the records in a table your Database Administrator can do so by using the TSQL DML Statement "DELETE"

    msdn.microsoft.com/.../ms189835.aspx

    The following example would delete all records from the Sales Header and Sales Line tables because a WHERE clause is not used to limit the number of rows deleted. This will remove all Document Types including Quotes, Orders, Return Orders, (there are 6 total document types in the Sales Header & Sales Line table):

    DELETE FROM Sales Header
    GO

    DELETE FROM Sales Line
    GO

    You can limit the types of documents deleted by using a WHERE statement. The following would delete all of the Sales Orders from the Sales Header table, but would leave the Quotes, Return Orders, Blanket Orders, and other documents in that same table:

    DELETE FROM Sales Header
    WHERE [Document Type] = 1
    GO

    The types of Documents in this table are as follows:
    0 = Quote
    1 = Order
    2 = Invoice (unposted)
    3 = Credit Memo (unposted)
    4 = Blanket Order
    5 = Return Order

    Deleting Sales Orders from the Sales Header & Sales Line tables can be done as long as the Orders have been Archived. However, your Database Administrator has to do the back-end research and testing in a test environment, and they will need to take responsibility for any damage done to your system.

    *I cannot take responsibility for how you use the available TSQL DML Statements.

  • Suggested answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: microsoft dynamics nav 2013 r2

    It is always easy to work with a new database, and it is very error free.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: microsoft dynamics nav 2013 r2

    Mr. Chandrasekara we will create new database and have a fresh start.

  • TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: microsoft dynamics nav 2013 r2

    Did you able to resolve your issue?

  • Suggested answer
    TharangaC Profile Picture
    TharangaC 23,116 on at
    RE: microsoft dynamics nav 2013 r2

    Is there any specific reason for delete data?

    If you want to start from fresh, best method is to create a new company and use rapid start packages as mohana mentioned.

    Deleting data will cause some problems in the system in long run. Best method is start with a new company.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: microsoft dynamics nav 2013 r2

    1. you can create new company and insert the data from existing company using rapid start packages. please search for more info regarding rapid start packages.

    2. try this blog

    www.olofsimren.com/record-deletion-tool-for-dynamics-nav-2015

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: microsoft dynamics nav 2013 r2

    Sir we want to delete all our data like sales order ,purchase order, all voucher entry etc.

  • Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: microsoft dynamics nav 2013 r2

    what type of data?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans