Skip to main content

Notifications

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

How to flow Custom field from Sales Order to Purchase Order

Posted on by 75
Hi ALL,
 
            I want to flow the custom fields from Sales Header table to Purchase Header table by using the action created purchase order in sales order page for this i am using the event subscriber, 
 

  [EventSubscriber(ObjectType::Codeunit, Codeunit::/Purch. Doc. From Sales Doc./, 'OnCreatePurchaseHeaderOnBeforeInsert', '', false, false)]

    local procedure OnCreatePurchaseHeaderOnBeforeInsert(var PurchaseHeader: Record /Purchase Header/; SalesHeader: Record /Sales Header/; Vendor: Record Vendor)

    begin

        PurchaseHeader./PI Created By/ := SalesHeader./PI Created By/;

        PurchaseHeader./SalesPerson CSR/ := SalesHeader./SalesPerson CSR/;

    end;

But it is not working, in the debugger also not going to this break point, is there any event for doing this, can anyone help me on this, Thanks for your advices.

 

Thanks & Regards,

Satish

Categories:

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans