Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

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

Posted on by 221

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
    DAnny3211 9,272 Super User 2024 Season 1 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
    DineshM 221 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
    Nitin Verma 21,091 Super User 2024 Season 1 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
    NAV_with_Narang 2,234 Super User 2024 Season 1 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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans