---
id: change/bcapps/10011
type: change
title: "#10011 Improve performance when posting credit memos by skipping unnecessary lookups on empty keys"
summary: Credit memo posting now skips unnecessary table lookups when source keys are empty, improving performance for both purchase and sales credit memos without changing functional behavior.
tier: official
language: en
tags:
  - performance
  - main
  - bc30
  - table purch. cr. memo line
  - table sales cr.memo line
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:10:11.413Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: b7227bc701fc847473535dcbac37bdec63ef2ec3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10011
    title: "microsoft/BCApps#10011: Improve performance when posting credit memos by skipping unnecessary lookups on empty keys"
    date: "2026-08-07"
    commit: b7227bc701fc847473535dcbac37bdec63ef2ec3
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/125
    - object/table/115
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10011
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10011
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-07T05:43:08Z"
author: JakovljevicDusan
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: performance
behavior_change: false
breaking: false
files:
  count: 22
  additions: 33
  deletions: 11
  al: 22
apps:
  - Base Application
objects_touched:
  - key: table/125
    page: table/125
    type: table
    id: 125
    name: Purch. Cr. Memo Line
    app: Base Application
    status: modified
  - key: table/115
    page: table/115
    type: table
    id: 115
    name: Sales Cr.Memo Line
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 645247
systems:
  - purchasing
  - sales
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10011 Improve performance when posting credit memos by skipping unnecessary lookups on empty keys

> Credit memo posting now skips unnecessary table lookups when source keys are empty, improving performance for both purchase and sales credit memos without changing functional behavior.

[Pull request](https://github.com/microsoft/BCApps/pull/10011) · merged into `main` (BC30) on 2026-08-07 by JakovljevicDusan · 22 files (+33 -11), 22 AL · performance · tier official · reviewed (checked by Opus)

## What changed

- Purch. Cr. Memo Line only runs the Purch. Inv. Line lookup when Order No. is filled in
- Sales Cr.Memo Line exits early when the header's Applies-to Doc. No. is empty
- Avoids broad table scans during credit memo posting and related lookups
- Functional behavior is unchanged
- Applied in W1 and several country layers

## AL objects touched

- [Table 125 "Purch. Cr. Memo Line"](../../objects/table/125.md), Base Application: modified
- [Table 115 "Sales Cr.Memo Line"](../../objects/table/115.md), Base Application: modified

## Context

- Work items: AB#645247
- Labels: Team: SCM
- Systems: purchasing, sales

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