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

Custom Fields Not Transferring from Purchase Header to Posted Documents

(4) ShareShare
ReportReport
Posted on by 890

Hi everyone,

I’m trying to transfer two custom fields from the Purchase Header table to the posted documents (Purch. Rcpt. Header and Purch. Inv. Header) during the posting process.

Here’s what I’ve done so far:

  • I created the custom fields on all related tables:

    • Source: Purchase Header

    • Destinations: Purch. Rcpt. Header and Purch. Inv. Header

  • I used the same field IDs and matching data types across all tables

However, after posting, the values from the Purchase Header are not transferred to the posted documents.

Am I missing something in the standard posting process?

Do I need to explicitly handle this transfer in code (e.g., using events or subscribers), or should it work automatically?

Any guidance or best practices would be appreciated!

 

Thanks in advance

I have the same question (0)
  • Suggested answer
    Tech-Lucky Profile Picture
    1,286 Moderator on at

    This should work if the same Field ID and data type have been used. Please double-check your code to ensure consistency. If the issue still persists, try debugging the exact logic in the base application where the TransferFields function is being called.

    Additionally, verify whether any other customizations or event triggers might be interfering and causing this issue.

     
     
     
  • Gerardo Rentería García Profile Picture
    26,019 Most Valuable Professional on at
  • Suggested answer
    RockwithNav Profile Picture
    9,052 Super User 2026 Season 1 on at
    Technically it should flow automatically. Only prerequisites is field id data type and length should be same.
    Now as you said its not flowing, just see if you have any custom extension installed and for a moment uninstall them and then see.
    It's a base process and should work.
  • Suggested answer
    YUN ZHU Profile Picture
    99,697 Super User 2026 Season 1 on at
    Hi, I mentioned it in the post below, you can refer to it.
     
    Thanks.
    ZHU
  • Suggested answer
    Yash_Mistry Profile Picture
    166 on at
    Check the data type of the field, as I encountered a similar issue.
     
    If you are using a BLOB data type, you need to use CalcFields() in the transfer events, as the value will not be available without it.
     
    If the issue still persists, I recommend debugging the code to identify the exact cause. You can refer to the following events for guidance, and you may find similar events for Purchase as well:
     
    OnInsertShipmentHeaderOnBeforeTransferFieldsToSalesShptHeader
    OnInsertInvoiceHeaderOnBeforeSalesInvHeaderTransferFields

     
    Regards,
    Yash Mistry
  • Suggested answer
    OussamaSabbouh Profile Picture
    14,008 Super User 2026 Season 1 on at
    Hello ,
    This does not happen automatically in Business Central: even if your custom fields exist on Purchase Header, Purch. Rcpt. Header, and Purch. Inv. Header with the same ID and data type, the standard posting routine will not copy them unless Microsoft explicitly coded that behavior for those fields, so yes, you need to handle it yourself by adding an event subscriber in the purchase posting process and manually assigning the values from Purchase Header to the posted receipt/invoice headers at the right event in codeunit Purch.-Post; in practice, that is the standard and clean way to do it, and Microsoft’s guidance is to extend posting logic through events/subscribers, not to expect automatic transfer for custom fields.
    Regards,
    Oussama Sabbouh
  • Suggested answer
    Aman Kakkar Profile Picture
    3,180 Super User 2026 Season 1 on at
    Hi,
     
    If the custom fields aren't flowing, you can use the below mentioned events in Codeunit 90 "Purch. Post".
     
    Purch Header to Purch Inv Header -
     
    local procedure OnBeforePurchInvHeaderInsert(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchHeader: Record "Purchase Header"; CommitIsSupressed: Boolean)
    begin
    
    end;
     
    And for Purch Header to Purch Rcpt Header -
     
    local procedure OnBeforePurchRcptHeaderInsert(var PurchRcptHeader: Record "Purch. Rcpt. Header"; var PurchaseHeader: Record "Purchase Header"; CommitIsSupressed: Boolean; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; WhseReceive: Boolean; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; WhseShip: Boolean)
    begin
    
    end;
    Do mark as verified if this helps.
    Aman K

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 March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,948 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,048 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 727 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans