Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Help : flowing data from "Warehouse Receipt" to posted purchase Receipt at line level

(0) ShareShare
ReportReport
Posted on by 238

Hello Experts,

I have taken 4 fields(supplier name , supplier date , Remark , QC inspector,  on warehouse receipt line and same on Purch. Rcpt. Line as shown in image.I want to flow data from warehouse receipt line to purch receipt line when I click post receipt action on warehouse. I tried on event (on after insert) but did not work.

I Tried using Event subcriber but not Getting How and where to Wirte Code 

Can you please Help experts 

Thank in advance

pastedimage1676358209653v2.png

pastedimage1676358153683v1.png

Thanks in Advance

  • Verified answer
    DAnny3211 Profile Picture
    9,278 Moderator on at
    RE: Help : flowing data from "Warehouse Receipt" to posted purchase Receipt at line level

    hi

    try this function OnAfterPostedWhseRcptLineInsert

    you have the two instances you are interested in: PostedWhseRcptLine, WhseRcptLine

    then within the function you create you can assign the values

    PostedWhseRcptLine. "Supllier Name". := WhseRcptLine.Supllier Name" ;

    PostedWhseRcptLine.Remark :=WhseRcptLine.Remark;

    PostedWhseRcptLine. "QC Inspector":=WhseRcptLine. "QC Inspector";

    check my answer if it helped you, thanks

    DAniele

  • DineshM Profile Picture
    238 on at
    RE: Help : flowing data from "Warehouse Receipt" to posted purchase Receipt at line level

    Hi sir,

    I have created saprate codunint and subscribe event as follw

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Whse.-Post Receipt", 'OnAfterPostWhseJnlLine', '', true, true)]

    local procedure OnAfterPostWhseJnlLine(var WarehouseReceiptLine: Record "Warehouse Receipt Line")

    var
         warehousereceiptLine: Record "Warehouse Receipt Line";

    begin

    warehousereceiptLine."Supllier Name" := Supllier Name" ;
    warehousereceiptLine.Remark :=Remark; 
    warehousereceiptLine."QC Inspector":= "QC Inspector";

     end;

    also at page extension also tried but not Getting

     modify("Post Receipt")
            {

                trigger OnAfterAction()
                var
                 WRL:Record "Warehouse Receipt Line";
                begin
               
                    wRl.Reset();
                    WRL.SetRange(WRL."No.",Rec."No.");
                    WRL.SetRange(WRL."Source No.",Rec.source);
                   

    WRL."Supllier Name" := Rec.?
    WRL.Remark :=REc?
    WRL."QC Inspector":= Rec?

                    rec.MODIFY;

                end;
            }
  • Suggested answer
    Nitin Verma Profile Picture
    21,565 Moderator on at
    RE: Help : flowing data from "Warehouse Receipt" to posted purchase Receipt at line level

    You can try below Event from codeunit 5760 "Whse.-Post Receipt

    OnPostSourceDocumentOnBeforePostPurchaseHeader(var PurchHeader: Record "Purchase Header"; WhseRcptHeader: Record "Warehouse Receipt Header"; SuppressCommit: Boolean; var CounterSourceDocOK: Integer; var IsHandled: Boolean)

  • NAV_with_Narang Profile Picture
    2,246 Moderator on at
    RE: Help : flowing data from "Warehouse Receipt" to posted purchase Receipt at line level

    Can you please highlight which Event/Publisher you have tried using? Also maybe post the code you've written

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans