---
title: "Codeunit 6212 Sustainability Post Mgt"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/
type: codeunit
id: 6212
name: "Sustainability Post Mgt"
app: "Sustainability"
namespace: Microsoft.Sustainability.Posting
versions: "24-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
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

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

| | |
| --- | --- |
| App | Sustainability |
| Namespace | Microsoft.Sustainability.Posting |
| Versions | 24-29 |
| Minors | W1 24.0-29.0; DE 24.0-29.0; US 24.0-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/6212-sustainability-post-mgt/editions.json) |
| Source file | src/Posting/SustainabilityPostMgt.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| InsertLedgerEntry | (SustainabilityJnlLine: Record "Sustainability Jnl. Line") | - | public | 24-29 | - | - |
| ResetFilters | (var SustainabilityJnlLine: Record "Sustainability Jnl. Line") | - | public | 24-29 | - | - |
| GetStartPostingProgressMessage | () | Text | internal | 24-29 | - | - |
| GetCheckJournalLineProgressMessage | (LineNo: Integer) | Text | internal | 24-29 | - | - |
| GetProgressingLineMessage | (LineNo: Integer) | Text | internal | 24-29 | - | - |
| GetJnlLinesPostedMessage | () | Text | internal | 24-29 | - | - |
| GetPostConfirmMessage | () | Text | internal | 24-29 | - | - |
| UpdateCarbonFeeEmission | (var SustainabilityLedgerEntry: Record "Sustainability Ledger Entry") | - | public | 25-29 | - | - |
| InsertValueEntry | (SustainabilityJnlLine: Record "Sustainability Jnl. Line"; ValueEntry: Record "Value Entry"; ItemLedgerEntry: Record "Item Ledger Entry") | - | public | 26-29 | - | - |
| UpdateCO2ePerUnit | (SustValueEntry: Record "Sustainability Value Entry") | - | public | 26-29 | - | - |
| UpdateCarbonFeeEmissionForValueEntry | (var SustainabilityValueEntry: Record "Sustainability Value Entry"; SustainabilityJnlLine: Record "Sustainability Jnl. Line") | - | public | 26-29 | - | - |
| UpdateCarbonFeeEmissionValues | (ScopeType: Enum "Emission Scope"; PostingDate: Date; CountryRegionCode: Code[10]; EmissionCO2: Decimal; EmissionN2O: Decimal; EmissionCH4: Decimal; var CO2eEmission: Decimal; var CarbonFee: Decimal) | Decimal | public | 26-29 | - | - |
| InsertValueEntry | (SustainabilityJnlLine: Record "Sustainability Jnl. Line"; JobLedgerEntry: Record "Job Ledger Entry") | - | public | 27-29 | - | - |
| InsertValueEntry | (SustainabilityJnlLine: Record "Sustainability Jnl. Line"; ResourceLedgerEntry: Record "Res. Ledger Entry") | - | public | 28-29 | - | - |
| InsertValueEntry | (SustainabilityJnlLine: Record "Sustainability Jnl. Line"; FALedgerEntry: Record "FA Ledger Entry") | - | public | 28-29 | - | - |
| GetTotalCO2eAmount | (ItemLedgerEntry: Record "Item Ledger Entry"; ValueEntryType: Enum "Capacity Type Journal"; var TotalCO2e: Decimal; CO2ePerUnit: Decimal) | - | public | 28-29 | - | - |
| GetCO2eAmountAndQuantity | (ItemLedgerEntryNo: Integer; var CO2eAmount: Decimal; var CO2eQuantity: Decimal) | - | public | 28-29 | - | - |
| GetTotalCO2eAmountFromValueEntry | (ItemLedgerEntryDocumentType: Enum "Item Ledger Document Type"; DocumentNo: Code[20]; DocumentLineNo: Integer; ItemNo: Code[20]; var TotalCO2eAmount: Decimal; var TotalCO2eQuantity: Decimal) | - | public | 28-29 | - | - |
| IsCarbonTrackingSpecificItem | (ItemNo: Code[20]) | Boolean | public | 28-29 | - | - |
| SetSkipUpdateCarbonEmissionValue | (NewSkipUpdateCarbonEmissionValue: Boolean) | - | internal | 28-29 | - | - |
| SetNextGLEntryNo | (NewGLEntryNo: Integer) | - | internal | 29 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnBeforeInsertSustainabilityLedgerEntry | (var SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; SustainabilityJnlLine: Record "Sustainability Jnl. Line") | 27-29 | - | - |
| Internal event | OnInsertLedgerEntryOnBeforeInsert | (var SustainabilityLedgerEntry: Record "Sustainability Ledger Entry"; var IsHandled: Boolean) | 28-29 | - | - |

## Source

Symbols: Microsoft.Sustainability.symbols.b3780cd9-f8f8-4a83-a4d5-0c2ad87b28af, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
