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 :
Microsoft Dynamics NAV (Archived)

Revert Posted Item Tracking

(0) ShareShare
ReportReport
Posted on by

Hi all,

I have a situation in which i have shipped some items from my Sales Order.

I had a custom report which when i did print my Posted Sales Shipment , it deleted tracking specification( by mistake).

So now i have no Tracking Specification for that shipment.

I want to undo the shipment but i am getting errors while trying to get Tracking Specification, which is fair since i have no entries.

I i comment out the RevertPostedItemTracking Method , it works just fine. Am i going to miss something important if i skip this step or i can give it a go?

The Function : 

LOCAL RevertPostedItemTracking(VAR TempItemLedgEntry : TEMPORARY Record "Item Ledger Entry";AvailabilityDate : Date)
WITH TempItemLedgEntry DO BEGIN
  IF FIND('-') THEN BEGIN
    REPEAT
      TrackingSpecification.GET("Entry No.");
      IF NOT TrackingIsATO(TrackingSpecification) THEN BEGIN
        ReservEntry.INIT;
        ReservEntry.TRANSFERFIELDS(TrackingSpecification);
        ReservEntry.VALIDATE("Quantity (Base)");
        ReservEntry."Reservation Status" := ReservEntry."Reservation Status"::Surplus;
        IF ReservEntry.Positive THEN
          ReservEntry."Expected Receipt Date" := AvailabilityDate
        ELSE
          ReservEntry."Shipment Date" := AvailabilityDate;
        ReservEntry."Entry No." := 0;
        ReservEntry.UpdateItemTracking;
        ReservEntry.INSERT;

        TempReservEntry := ReservEntry;
        TempReservEntry.INSERT;
      END;
      TrackingSpecification.DELETE;
    UNTIL NEXT = 0;
    ReservEngineMgt.UpdateOrderTracking(TempReservEntry);
  END;
END; // WITH


*This post is locked for comments

I have the same question (0)

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 > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans