Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

missing sales order in archive

Posted on by Microsoft Employee

Good day, Nav experts -

We are using Nav 2015. We found that the sales orders were deleted from the sales order archive. Is there a setting for that? How can we stop from deleting sales orders from archive?

Thank you!

Encompass

*This post is locked for comments

  • Suggested answer
    Yogesh Kulkarni_ Profile Picture
    Yogesh Kulkarni_ 1,762 on at
    RE: missing sales order in archive

    Better to remove the delete permission for Sales Header and Line Archive.

    And check whether some Report or Codeunit is been scheduled to delete Archived Sales Orders or not.

    -Yogesh Kulkarni
    Please verify, if you find answer helpful.

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: missing sales order in archive

    Check whether Delete sales archive ordee job has been scheduled in job queue  

    Or

    Check any customization did for deleting these transactions

    For solution you can either add error code on Ondelete Trigger or just disable the permission on sales order archive page DeleteAllowed to No

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: missing sales order in archive

    Thanks very much for your reply.

    But I doubt that sales orders were deleted by a user manually in my case - since I checked with my users and none of them thought that they would do that, and more importantly, 5,000+ sales orders were deleted from archive since we went to Production months ago, which sounds like a background job automatically purging the sales orders from archive.

    Any thoughts?

    Thanks!

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: missing sales order in archive

    Agree with Indika setup user permissions to prevent deletion of data rather than make a customization, if you would like to prevent users from doing this. Also, it is recommended to setup change log so you would be able to see who or what is deleting the archived orders.

  • Suggested answer
    Indikauk Profile Picture
    Indikauk 1,759 on at
    RE: missing sales order in archive

    Hi Encompassconnor

    It is Better if you Remove the Deleting Permission Sales Header Archive & Sales Line Archive Table from the Permission Set So that you don't have to do any object modification for the This That Can be Achieved without doing a customization.  that will make your life easy when it comes to upgrading the system.

    Thanks

    Indika.

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: missing sales order in archive

    If you are developer then simple write one statement on OnDelete Trigger

    ERROR('You can not delete this transaction');

  • Suggested answer
    Maneesha Profile Picture
    Maneesha 5,889 on at
    RE: missing sales order in archive

    Hi encompassconnor ,

    Can you check ... blocking following permission from user ? 

    Capttesture.JPG

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: missing sales order in archive

    OnDelete Trigger will execute on the table when it is manually deleted, so if you write code in that to error, it will stop the users deleting it.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: missing sales order in archive

    Thank you for the answer.

    What would trigger the deletion in the sales order archive then and when?

    Appreciated it!

    Encompass

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: missing sales order in archive

    There is no setting to avoid deleting, you need to customize to achieve it, add ERROR Statement in OnDelete Trigger of the Sales Header Archive Table.

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans