---
id: change/bcapps/9585
type: change
title: "#9585 [master] Description Field value gets automatically reverted the original value after changing it."
summary: Fixed a bug where the Description field on sales lines would revert to its original item value after editing, when Calc. Inv. Discount was enabled and Quantity had been validated.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit document totals
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:12:03.158Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 4a99d5900499dbbfe6bb7befb96d454de34d58a4
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9585
    title: "microsoft/BCApps#9585: [master] Description Field value gets automatically reverted the original value after changing it."
    date: "2026-07-20"
    commit: 4a99d5900499dbbfe6bb7befb96d454de34d58a4
    t: null
    quote: Description Field value gets automatically reverted the original value after changing it.
links:
  learn: []
  objects:
    - object/codeunit/57
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9585
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9585
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-20T12:56:29Z"
author: neeleshsinghal
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 44
  deletions: 3
  al: 3
apps:
  - Base Application
objects_touched:
  - key: codeunit/57
    page: codeunit/57
    type: codeunit
    id: 57
    name: Document Totals
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 638838
systems:
  - platform
quote: Description Field value gets automatically reverted the original value after changing it.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9585 [master] Description Field value gets automatically reverted the original value after changing it.

> Fixed a bug where the Description field on sales lines would revert to its original item value after editing, when Calc. Inv. Discount was enabled and Quantity had been validated.

[Pull request](https://github.com/microsoft/BCApps/pull/9585) · merged into `main` (BC30) on 2026-07-20 by neeleshsinghal · 4 files (+44 -3), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Editing Description after validating Quantity reverted it when Calc. Inv. Discount was enabled
- In CalculateSalesSubPageTotals the NeedRefreshSalesLine reset sat after the TotalsUpToDate early exit, so the flag stayed true
- The reset now runs before the early exit, so RefreshSalesLine no longer reloads the line and drops the edit
- Applied to the W1, BE and NA Document Totals codeunits
- Test added in the Document Totals pages test codeunit
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 57 "Document Totals"](../../objects/codeunit/57.md), Base Application: modified

## Context

- Work items: AB#638838
- Labels: Team: SCM
- Systems: platform
- From the description: "Description Field value gets automatically reverted the original value after changing it."

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