---
id: post/yzhums-com/74172
type: post
title: "Dynamics 365 Business Central: How to flow/pass custom field values from Sales Order to Production Order"
summary: 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.
tier: community
language: en
tags:
  - custom fields
  - event subscribers
  - sales to production order flow
  - table extensions
  - page extensions
system: manufacturing
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:39:50.979Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: df7fb02df85e372286fb15cd95d36ff74633e42c8fdd770cb55e9a24b9b8b64b
evidence:
  - kind: blog
    url: https://yzhums.com/74172/
    title: "Dynamics 365 Business Central: How to flow/pass custom field values from Sales Order to Production Order"
    date: "2026-06-25"
    commit: null
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/99000792
    - object/table/36
    - object/table/37
    - object/table/5405
    - object/table/5406
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: post/thatnavguy-com/https-thatnavguy-com-blog-2025-bc-friday-tips-56-understand-missing-fields-in-copy-documents--e98f782aea
      title: "BC Friday Tips #56 Understand Missing Fields in Copy Documents"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/thatnavguy-com/https-thatnavguy-com-blog-2026-bc-friday-tips-84-item-missing-from-sales-line-lookup--ac89a8fbc6
      title: "BC Friday Tips #84 Why Is Your Item Missing from the Sales Line Lookup?"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/kine-cz/https-blog-kine-cz-posts-bcdevelopmentserie-02b--0078d7faba
      title: "Business Central Development Serie - Part 2b: AI for BC Development — The Knowledge Gap That Ships to Production"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/70008
      title: "Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL)"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/56173
      title: "Dynamics 365 Business Central: Entering Quantities/Amounts by Calculation and Negative Numbers"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/25134
      title: "Dynamics 365 Business Central: How to note the records that the user has selected on the Subpage/Lines (Page.SetSelectionFilter in part)"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/64478
      title: "Dynamics 365 Business Central: How to quickly check if a field is a primary key field"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/31884
      title: "Dynamics 365 Business Central: Quickly get next Sequence/Entry Number (without using FindLast -> Entry No. + 1)"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/yzhums-com/66212
      title: "Dynamics 365 Business Central: Use a default quantity of 1 for all types on documents – Customization"
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
    - to: post/aardvarklabs-blog/1891
      title: Implementing a Multi-Step Process for AI Recommendations in Business Central
      label: possibly related
      why: both name Table 37 "Sales Line"
      by: code
post_id: "74172"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/74172/
published_at: "2026-06-25T05:48:54.000Z"
author: Yun Zhu
full_text: false
words: 723
quotes: []
code_objects_mentioned:
  - codeunit Create Prod. Order from Sale
  - table Sales Header
  - table Sales Line
  - table Production Order
  - table Prod. Order Line
systems:
  - manufacturing
  - sales
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2026/06/Snipaste_2026-06-24_17-53-59.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:03:46.445Z"
---

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

[Read the post](https://yzhums.com/74172/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2026-06-25 · 723 words · tier community · reviewed (checked by Opus)

> 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.

## 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.

- [codeunit 99000792 "Create Prod. Order from Sale"](../../objects/codeunit/99000792.md)
- [table 36 "Sales Header"](../../objects/table/36.md)
- [table 37 "Sales Line"](../../objects/table/37.md)
- [table 5405 "Production Order"](../../objects/table/5405.md)
- [table 5406 "Prod. Order Line"](../../objects/table/5406.md)

## Possibly related

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

- [BC Friday Tips #56 Understand Missing Fields in Copy Documents](../../posts/thatnavguy-com/https-thatnavguy-com-blog-2025-bc-friday-tips-56-understand-missing-fields-in-copy-documents--e98f782aea.md) — possibly related: both name Table 37 "Sales Line"
- [BC Friday Tips #84 Why Is Your Item Missing from the Sales Line Lookup?](../../posts/thatnavguy-com/https-thatnavguy-com-blog-2026-bc-friday-tips-84-item-missing-from-sales-line-lookup--ac89a8fbc6.md) — possibly related: both name Table 37 "Sales Line"
- [Business Central Development Serie - Part 2b: AI for BC Development — The Knowledge Gap That Ships to Production](../../posts/kine-cz/https-blog-kine-cz-posts-bcdevelopmentserie-02b--0078d7faba.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL)](../../posts/yzhums-com/70008.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: Entering Quantities/Amounts by Calculation and Negative Numbers](../../posts/yzhums-com/56173.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: How to note the records that the user has selected on the Subpage/Lines (Page.SetSelectionFilter in part)](../../posts/yzhums-com/25134.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: How to quickly check if a field is a primary key field](../../posts/yzhums-com/64478.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: Quickly get next Sequence/Entry Number (without using FindLast -> Entry No. + 1)](../../posts/yzhums-com/31884.md) — possibly related: both name Table 37 "Sales Line"
- [Dynamics 365 Business Central: Use a default quantity of 1 for all types on documents – Customization](../../posts/yzhums-com/66212.md) — possibly related: both name Table 37 "Sales Line"
- [Implementing a Multi-Step Process for AI Recommendations in Business Central](../../posts/aardvarklabs-blog/1891.md) — possibly related: both name Table 37 "Sales Line"

## 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.
