web
You’re offline. This is a read only version of the page.
close
Skip to main content
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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#2
SC666 Profile Picture

SC666 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans