---
id: post/duiliotacconi-com/1667
type: post
title: Sorting by Type and Line No. in Sales and Purchase Postings
summary: 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.
tier: community
language: en
tags:
  - posting performance
  - concurrency
  - deadlocks
  - sales postings
  - purchase postings
  - sorting order
  - feature management
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:58:43.812Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: f994912cc01b759e9be25b4a1c8f3db4bbf4265d7a165f80013e1fad940f611f
evidence:
  - kind: blog
    url: https://duiliotacconi.com/2025/10/13/sorting-by-type-and-line-no-in-sales-and-purchase-postings/
    title: Sorting by Type and Line No. in Sales and Purchase Postings
    date: "2025-10-13"
    commit: null
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/80
    - object/table/36
    - object/table/37
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "1667"
source_id: duiliotacconi-com
source_name: Duilio Tacconi
url: https://duiliotacconi.com/2025/10/13/sorting-by-type-and-line-no-in-sales-and-purchase-postings/
published_at: "2025-10-13T11:51:13.000Z"
author: Duilio Tacconi
full_text: false
words: 658
quotes: []
code_objects_mentioned:
  - codeunit Sales-Post
  - codeunit Purchase-Post
  - table Sales Header
  - table Sales Line
systems:
  - sales
  - purchasing
versions_mentioned:
  - 2025 Wave 2 (v27)
  - 2025 Wave 1 (v26)
preview:
  embeddable: true
  frame_url: https://duiliotacconi.com/2025/10/13/sorting-by-type-and-line-no-in-sales-and-purchase-postings/embed/
  image: https://duiliotacconi.com/wp-content/uploads/2025/10/jordanli.jpg
  image_alt: null
  image_w: 669
  image_h: 496
  site_name: Dynamics 365 Business Central tales, myths, legends. And something serious.
  favicon: https://duiliotacconi.com/wp-content/uploads/2023/07/cropped-wordpress.png?w=32
  probed_at: "2026-10-07T11:50:56.532Z"
---

# Sorting by Type and Line No. in Sales and Purchase Postings

[Read the post](https://duiliotacconi.com/2025/10/13/sorting-by-type-and-line-no-in-sales-and-purchase-postings/) · Duilio Tacconi (Duilio Tacconi, MVP) · 2025-10-13 · 658 words · tier community · reviewed (checked by Opus)

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

## 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"](../../objects/codeunit/80.md)
- codeunit "Purchase-Post"
- [table 36 "Sales Header"](../../objects/table/36.md)
- [table 37 "Sales Line"](../../objects/table/37.md)

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.
