community postManufacturingcommunity - not Microsoftreviewed - checked by Opus

Dynamics 365 Business Central: How to flow/pass custom field values from Sales Order to Production Order

Explains how to carry custom field values from a Sales Order to the Production Order created from it by subscribing to events raised in codeunit 99000792 Create Prod. Order from Sale. One event handles header to header mapping and another handles line to line mapping, with sample AL code including table and page extensions.

post Dynamics 365 Lab

Yun Zhu · 2026-06-25 · 723 words · about 3 min

Key points

  • Use event OnAfterCreateProdOrderFromSalesLine to pass values from Sales Header to Production Order header
  • Use event OnCreateProductionOrderOnBeforeProdOrderLineModify to pass values from Sales Line to Production Order Line
  • Extend both source (Sales Header/Line) and target (Production Order/Line) tables to add custom fields
  • Subscribe to standard events without modifying core codeunit logic

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

No source states these links: they share an object, a model read them, or a person found the same subject.

Context

  • Features: Production Order creation from Sales Order, Event-based customization, Custom field mapping, Item Order and Project Order types

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.