Sorting by Type and Line No. in Sales and Purchase Postings
In Business Central 2025 Wave 2 (v27), enabling the Feature Management option that lets multiple users post item ledger and value entries at the same time also makes sales and purchase posting process lines ordered by Type and then Line No. instead of Line No. alone, reducing deadlock risk. Per Tenant Extensions that rely on the old line order may need refactoring and should be tested before upgrading.

post Dynamics 365 Business Central tales, myths, legends. And something serious.
Key points
- Legacy posting sorted by Line No. only, causing deadlocks with heavy concurrency due to inconsistent resource locking order
- Business Central 2025 Wave 2 introduces sorting by Type and Line No. when the feature flag is enabled
- The new sorting order processes lines by type (G/L Account, Item, Resource, etc.) then by Line No., improving concurrent posting
- Per Tenant Extensions relying on old Line No. ordering must be refactored and tested before upgrading
- The feature can be disabled via Feature Management to fall back to legacy posting if needed
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 80 “Sales-Post”
- codeunit “Purchase-Post”
- table 36 “Sales Header”
- table 37 “Sales Line”
Not found in BC28-30: codeunit “Purchase-Post”.
Context
- Features: Multiple users posting item ledger entries simultaneously, Type-based sorting in sales postings, Type-based sorting in purchase postings, Legacy posting fallback, Deadlock prevention
- Versions: 2025 Wave 2 (v27), 2025 Wave 1 (v26)
Source: Duilio Tacconi, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.