---
title: "Codeunit 6212 Sustainability Post Mgt, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/points/
object: https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/
app: "Sustainability"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 6212 Sustainability Post Mgt, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/points/

18 procedures and triggers with a step in src/Apps/W1/Sustainability/app/src/Posting/SustainabilityPostMgt.Codeunit.al, in source order, read from the text, not from a run.

## InsertLedgerEntry

[Line 24](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L24).

- [32](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L32) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUsage`
- [33](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L33) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUptake`
- [41](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L41) calls `CopyDataFromAccountCategory`
- [43](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L43) calls `CopyDateFromAccountSubCategory`
- [45](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L45) validates [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) `User ID`
- [47](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L47) calls `UpdateCarbonFeeEmission`
- [49](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L49) raises `OnBeforeInsertSustainabilityLedgerEntry`
- [52](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L52) raises `OnInsertLedgerEntryOnBeforeInsert`, IsHandled
- [54](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L54) writes [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) Insert(true)
- [55](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L55) calls `CreateGLEntryRelations`

## CreateGLEntryRelations

[Line 59](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L59), local.

- [68](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L68) calls [Table 6260 Sust. Jnl. Line G/L Entry](https://jonas-paprotka.de/ref/table/6260-sust-jnl-line-g-l-entry/) `SetJournalLineFilter`
- [74](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L74) calls [Table 6261 Sust. G/L - Sust. Ledger Rel.](https://jonas-paprotka.de/ref/table/6261-sust-g-l-sust-ledger-rel/) `CreateRelation`

## InsertValueEntry

[Line 78](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L78).

- [90](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L90) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUsage`
- [91](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L91) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUptake`
- [93](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L93) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `GetLastEntryNo`
- [94](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L94) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `CopyFromValueEntry`
- [95](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L95) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `CopyFromSustainabilityJnlLine`
- [107](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L107) validates [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `User ID`
- [108](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L108) calls `UpdateCarbonFeeEmissionForValueEntry`
- [116](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L116) calls `CalcExpectedCO2e`
- [124](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L124) validates [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `CO2e Amount (Actual)`
- [126](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L126) writes [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) Insert(true)
- [128](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L128) calls `UpdateCO2ePerUnit`

## InsertValueEntry

[Line 131](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L131).

- [137](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L137) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUsage`
- [138](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L138) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUptake`
- [140](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L140) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `GetLastEntryNo`
- [141](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L141) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `CopyFromJobLedgerEntry`
- [142](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L142) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `CopyFromSustainabilityJnlLine`
- [143](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L143) validates [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `User ID`
- [146](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L146) calls `UpdateCarbonFeeEmissionForValueEntry`
- [147](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L147) writes [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) Insert(true)
- [149](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L149) calls `UpdateCO2ePerUnit`

## InsertValueEntry

[Line 152](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L152).

- [158](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L158) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUsage`
- [159](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L159) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUptake`
- [161](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L161) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `GetLastEntryNo`
- [162](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L162) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `CopyFromResourceLedgerEntry`
- [163](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L163) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `CopyFromSustainabilityJnlLine`
- [164](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L164) validates [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `User ID`
- [167](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L167) calls `UpdateCarbonFeeEmissionForValueEntry`
- [168](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L168) writes [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) Insert(true)
- [170](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L170) calls `UpdateCO2ePerUnit`

## InsertValueEntry

[Line 173](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L173).

- [179](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L179) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUsage`
- [180](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L180) calls [Codeunit 8703 Feature Telemetry](https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/) `LogUptake`
- [182](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L182) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `GetLastEntryNo`
- [183](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L183) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `CopyFromFALedgerEntry`
- [184](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L184) calls [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `CopyFromSustainabilityJnlLine`
- [185](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L185) validates [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) `User ID`
- [188](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L188) calls `UpdateCarbonFeeEmissionForValueEntry`
- [189](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L189) writes [Table 6227 Sustainability Value Entry](https://jonas-paprotka.de/ref/table/6227-sustainability-value-entry/) Insert(true)
- [191](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L191) calls `UpdateCO2ePerUnit`

## UpdateCO2ePerUnit

[Line 194](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L194).

- [203](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L203) calls [Codeunit 6257 SustCostManagement](https://jonas-paprotka.de/ref/codeunit/6257-sustcostmanagement/) `UpdateCO2ePerUnit`

## UpdateCarbonFeeEmission

[Line 216](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L216).

- [227](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L227) calls `UpdateCarbonFeeEmissionValues`

## UpdateCarbonFeeEmissionForValueEntry

[Line 232](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L232).

- [243](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L243) calls `UpdateCarbonFeeEmissionValues`
- [254](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L254) calls `CalcCO2ePerUnit`

## UpdateCarbonFeeEmissionValues

[Line 257](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L257).

- [279](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L279) calls `FindEmissionFeeForEmissionType`
- [285](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L285) calls `FindEmissionFeeForEmissionType`
- [291](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L291) calls `FindEmissionFeeForEmissionType`

## GetTotalCO2eAmount

[Line 300](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L300).

- [308](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L308) calls `IsCarbonTrackingSpecificItem`
- [314](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L314) calls [Codeunit 5801 Show Applied Entries](https://jonas-paprotka.de/ref/codeunit/5801-show-applied-entries/) `FindAppliedEntries`
- [316](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L316) calls `GetILEForAssemblyOutputs`
- [320](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L320) calls `GetCO2eAmountAndQuantity`
- [328](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L328) calls `CorrectSign`
- [336](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L336) calls `CalculateForProductionOutput`
- [337](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L337) calls `CorrectSign`
- [343](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L343) calls `CorrectSign`

## GetCO2eAmountAndQuantity

[Line 357](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L357).

- [364](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L364) calls `ResolveTransferInCO2e`

## ResolveTransferInCO2e

[Line 373](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L373), local.

- [389](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L389) calls [Codeunit 5801 Show Applied Entries](https://jonas-paprotka.de/ref/codeunit/5801-show-applied-entries/) `FindAppliedEntries`
- [395](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L395) calls `GetCO2eAmountAndQuantity`
- [410](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L410) calls `GetCO2eAmountAndQuantity`

## GetTotalCO2eAmountFromValueEntry

[Line 432](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L432).

- [449](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L449) calls `GetCO2eAmountAndQuantity`

## GetILEForAssemblyOutputs

[Line 472](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L472), local.

- [483](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L483) calls `GetConsumptionEntryType`
- [487](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L487) writes [Table 32 Item Ledger Entry](https://jonas-paprotka.de/ref/table/32-item-ledger-entry/) Insert

## CopyDataFromAccountCategory

[Line 543](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L543), local.

- [549](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L549) validates [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) `Emission Scope`
- [550](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L550) validates [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) `CO2`
- [551](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L551) validates [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) `CH4`
- [552](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L552) validates [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) `N2O`
- [553](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L553) validates [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) `Calculation Foundation`

## CopyDateFromAccountSubCategory

[Line 556](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L556), local.

- [562](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L562) validates [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) `Emission Factor CO2`
- [563](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L563) validates [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) `Emission Factor CH4`
- [564](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L564) validates [Table 6216 Sustainability Ledger Entry](https://jonas-paprotka.de/ref/table/6216-sustainability-ledger-entry/) `Emission Factor N2O`

## CalcExpectedCO2e

[Line 575](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L575), local.

- [596](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/source/#L596) calls `CalcExpCO2eToBalance`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
