community postSales & Receivablescommunity - not Microsoftreviewed - checked by Opus

Dynamics 365 Business Central: Use a default quantity of 1 for all types on documents – Customization

Business Central by default sets quantity to 1 only for Item and G/L Account line types on sales and purchase documents, but not for Resource, Fixed Asset, or Charge types. This post shows how to customize the system to apply default quantity of 1 to other document line types using table extensions and event subscribers.

post Dynamics 365 Lab

Yun Zhu · 2025-07-30 · 957 words · about 4 min

"As of now, the default quantity setting of 1 is only valid for Item type and G/L Account type."

Key points

  • Default quantity of 1 is currently limited to Item type in sales documents and G/L Account type in both sales and purchase documents
  • Resource, Fixed Asset, and Charge (Item) line types lack this default quantity feature out of the box
  • Two customization approaches are provided: using setup table fields with event handlers, or using field extension triggers for simpler one-time implementations
  • The solution uses event subscribers like OnAfterAssignResourceValues and OnAfterAssignFixedAssetValues to apply default quantities

Quotes

  • “As of now, the default quantity setting of 1 is only valid for Item type and G/L Account type.” (This explains the core limitation that drives the need for customization across different line types.)
  • “So if you need other types to be available as well, this will need to be customized.” (Clarifies that extending default quantity to Resource, Fixed Asset, and other types requires custom development.)

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: Default Quantity setting, Line type handling, Document line defaults
  • Versions: BC25

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.