---
id: change/bcapps/13255
type: change
title: "#13255 [Main]-Exporting vendor remittance gets stuck when a payment jour nal is sorted by Document No."
summary: Fixed vendor remittance export hanging when a payment journal is sorted by Document No. The export now uses primary key order instead of the current sort order to prevent lines from being processed repeatedly.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit bulk vendor remit reporting
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-10-28T10:56:13.846Z"
  flags: []
generated:
  at: "2026-10-29T00:16:37.959Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 28796ac64f0cd260bf68ab7ef9bcbc6e927f1724
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13255
    title: "microsoft/BCApps#13255: [Main]-Exporting vendor remittance gets stuck when a payment jour nal is sorted by Document No."
    date: "2026-10-26"
    commit: 28796ac64f0cd260bf68ab7ef9bcbc6e927f1724
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/10250-ca
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/ui-extensions-send-remittance-advice
      title: Send Remittance Advice Extension | Microsoft Docs
      label: possibly related
      why: Documents the Send Remittance Advice extension for vendor remittance payment processing.
      by: model
number: 13255
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13255
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-26T17:58:35Z"
author: DhavalMore88
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 52
  deletions: 0
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/10250
    page: codeunit/10250-ca
    type: codeunit
    id: 10250
    name: Bulk Vendor Remit Reporting
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 656758
systems:
  - finance
quote: null
joined_against:
  major: "30"
  commit: 15385dede95a4f9e7be01be47c684fc9d654a7ce
---

# #13255 [Main]-Exporting vendor remittance gets stuck when a payment jour nal is sorted by Document No.

> Fixed vendor remittance export hanging when a payment journal is sorted by Document No. The export now uses primary key order instead of the current sort order to prevent lines from being processed repeatedly.

[Pull request](https://github.com/microsoft/BCApps/pull/13255) · merged into `main` (BC30) on 2026-10-26 by DhavalMore88 (community contribution) · 2 files (+52 -0), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Export loop now uses primary key order (Journal Template Name, Journal Batch Name, Line No.) instead of the journal's current sort order
- Prevents lines from resorting during processing when Document No. is updated
- Each line is now exported exactly once instead of repeatedly
- Added regression test ExportPaymentJournalSortedByDocumentNo
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 10250 "Bulk Vendor Remit Reporting"](../../objects/codeunit/10250-ca.md), Base Application (CA layer): modified

## Context

- Work items: AB#656758
- Labels: ADO: Sync, From Fork, Team: Finance
- Systems: finance

## Possibly related

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

- [Send Remittance Advice Extension | Microsoft Docs](https://learn.microsoft.com/dynamics365/business-central/ui-extensions-send-remittance-advice) — possibly related: Documents the Send Remittance Advice extension for vendor remittance payment processing. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
