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 flow fields from reservation entry on posting purchase document.

(0) ShareShare
ReportReport
Posted on by 151

Anyone know the event which help me to flow data from reservation entries to item ledger entry on posting purchase document.

I am not able to find it.
Thanks in advance.

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi,

    Can you try take idea from codeunit 90 with below event? This is an Idea just.

    procedure OnBeforePostItemJnlLine(PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; var QtyToBeReceived: Decimal; var QtyToBeReceivedBase: Decimal; var QtyToBeInvoiced: Decimal; var QtyToBeInvoicedBase: Decimal; var ItemLedgShptEntryNo: Integer; var ItemChargeNo: Code[20]; var TrackingSpecification: Record "Tracking Specification"; CommitIsSupressed: Boolean; var IsHandled: Boolean; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var Result: Integer)

    var

       ReservationEntry: Record "Reservation Entry";

       ItemLedgerEntry: Record "Item Ledger Entry";

    begin

       // Retrieve the reservation entries related to the purchase

       ReservationEntry.SetRange("Document Type", ReservationEntry."Document Type"::"Purchase Invoice");

       ReservationEntry.SetRange("Document No.", PurchaseInvoiceHeader."No.");

       if ReservationEntry.FindSet then

       begin

           // Flow data from reservation entries to item ledger entries

           while ReservationEntry.Next = true do

           begin

               ItemLedgerEntry."Entry Type" := ItemLedgerEntry."Entry Type"::Reservation;

               ItemLedgerEntry."Item No." := ReservationEntry."Item No.";

               ItemLedgerEntry."Variant Code" := ReservationEntry."Variant Code";

               ItemLedgerEntry.Quantity := ReservationEntry.Quantity;

               ItemLedgerEntry.Insert;

           end;

       end;

    end;

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,184 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 677

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans