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...
Suggested Answer

How to archive always the newest version of a purchase order?

(1) ShareShare
ReportReport
Posted on by 30

Hi guys,

I would like to find out who adjusted an order again later and possibly what was done there.

Now I have thought of the archive and would like to push again and again the new version (thus also the change) into the archive.

In the page 54 Purchase Order Subform I have written in the OnInsertRecord trigger code that pushes the current document into the archive using the codeunit 5063 ArchiveManagement and the function StorePurchDocument.

This also works so far.

However, if a document has never been archived, after changing my order (change 1) I do not get the last status of the order in the archive, but the original status (original).

If I then create a new order line (change 2), then the order is also archived again, but with my previous changes (change 1). Not with the latest (change 2)?!

Am I using the wrong trigger? Should I do it better in the table?

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    98,421 Super User 2026 Season 1 on at

    I think if you just want to know the modification history of the purchase order, it would be better to use the Change Log feature.

    More details: https://learn.microsoft.com/en-us/dynamics-nav-app/across-log-changes

    https://learn.microsoft.com/en-us/dynamics-nav-app/across-log-changes

    If you insist on using your solution, you can also add your code to the OnInsertRecord trigger code on the Purchase Order (50, Document) to ensure that the order has been archived. But I personally think this is not the best solution.

    Hope this helps.

    Thanks

    ZHU

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,958 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,101 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans