---
id: change/bcapps/10183
type: change
title: "#10183 Bug 646432: [master] [Sustainability] Line does not indicate/enforce which Calculation Foundation is in use; all formula input fields are editable"
summary: Sustainability Journal and Purchase Order lines now enforce field editability based on the selected account category's Calculation Foundation and Emission Scope, preventing users from editing formula inputs that are not supported by the chosen calculation method.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit sustainability calc. mgt.
  - page sustainability journal
  - pageextension sust. purch. order subform
system: sustainability
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:56.792Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a6cba404f10ab9ca97b896450c4e6c11ebe0892f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10183
    title: "microsoft/BCApps#10183: Bug 646432: [master] [Sustainability] Line does not indicate/enforce which Calculation Foundation is in use; all formula input fields are editable"
    date: "2026-08-21"
    commit: a6cba404f10ab9ca97b896450c4e6c11ebe0892f
    t: null
    quote: Only formula inputs used by the selected scope and calculation foundation are editable.
links:
  learn: []
  objects:
    - object/codeunit/6218
    - object/page/6219
    - object/pageextension/6211
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10183
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10183
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-21T12:28:51Z"
author: AleksanderGladkov
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 5
  additions: 631
  deletions: 5
  al: 3
apps:
  - Sustainability
objects_touched:
  - key: codeunit/6218
    page: codeunit/6218
    type: codeunit
    id: 6218
    name: Sustainability Calc. Mgt.
    app: Sustainability
    status: modified
  - key: page/6219
    page: page/6219
    type: page
    id: 6219
    name: Sustainability Journal
    app: Sustainability
    status: modified
  - key: pageextension/6211
    page: pageextension/6211
    type: pageextension
    id: 6211
    name: Sust. Purch. Order Subform
    app: Sustainability
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 646432
systems:
  - sustainability
quote: Only formula inputs used by the selected scope and calculation foundation are editable.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10183 Bug 646432: [master] [Sustainability] Line does not indicate/enforce which Calculation Foundation is in use; all formula input fields are editable

> Sustainability Journal and Purchase Order lines now enforce field editability based on the selected account category's Calculation Foundation and Emission Scope, preventing users from editing formula inputs that are not supported by the chosen calculation method.

[Pull request](https://github.com/microsoft/BCApps/pull/10183) · merged into `main` (BC30) on 2026-08-21 by AleksanderGladkov · 5 files (+631 -5), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Formula input fields are now editable only when used by the selected Emission Scope and Calculation Foundation
- Manual Input field changes, account selection changes, and unsupported combinations trigger automatic state refresh
- Shared editability rules applied consistently across both Sustainability Journal and Purchase Order subform pages
- Comprehensive test coverage added for Journal and Purchase Order combinations, fallback setup, and account changes
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 6218 "Sustainability Calc. Mgt."](../../objects/codeunit/6218.md), Sustainability: modified
- [Page 6219 "Sustainability Journal"](../../objects/page/6219.md), Sustainability: modified
- [Page extension 6211 "Sust. Purch. Order Subform"](../../objects/pageextension/6211.md), Sustainability: modified

## Context

- Work items: AB#646432
- Labels: AL: Apps (W1), Team: Finance
- Systems: sustainability
- From the description: "Only formula inputs used by the selected scope and calculation foundation are editable."

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