---
id: object/codeunit/6279
type: object
title: Codeunit 6279 "Sust. Approvals Mgmt."
summary: Codeunit 6279 "Sust. Approvals Mgmt." in Sustainability (Microsoft.Sustainability.Workflow). 11 public procedures, 3 events, 4 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - sustainability
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 8f4dd7eba83f4465061814efebdee1d102f41e432552dde93edaf46c9c755b8a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Sustainability/app/src/Workflow/SustApprovalsMgmt.Codeunit.al
    title: src/Apps/W1/Sustainability/app/src/Workflow/SustApprovalsMgmt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 6279
name: Sust. Approvals Mgmt.
namespace: Microsoft.Sustainability.Workflow
app: Sustainability
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 24
  events: 3
  subscribers: 4
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 5
  called_by: 2
  implements: 0
---

# Codeunit 6279 "Sust. Approvals Mgmt."

> Codeunit 6279 "Sust. Approvals Mgmt." in Sustainability (Microsoft.Sustainability.Workflow). 11 public procedures, 3 events, 4 event subscribers. Introduced in BC29, still in BC30.

Sustainability · Microsoft.Sustainability.Workflow · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Sustainability/app/src/Workflow/SustApprovalsMgmt.Codeunit.al) · facts from BC29

## Events published

- `OnBeforeIsSustJournalBatchApprovalsWorkflowEnabled(var SustJournalBatch: Record "Sustainability Jnl. Batch"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnSendSustainabilityJournalBatchForApproval(var SustJournalBatch: Record "Sustainability Jnl. Batch")` (integration)
  - subscribers: [Codeunit 6280 "Sust. Workflow Event Handling"](../codeunit/6280.md) RunWorkflowOnSendSustJournalBatchForApproval
- `OnCancelSustainabilityJournalBatchApprovalRequest(var SustJournalBatch: Record "Sustainability Jnl. Batch")` (integration)
  - subscribers: [Codeunit 6280 "Sust. Workflow Event Handling"](../codeunit/6280.md) RunWorkflowOnCancelSustJournalBatchApprovalRequest

## Event subscriptions

- PopulateApprovalEntryArgument subscribes to Codeunit "Approvals Mgmt." OnPopulateApprovalEntryArgument
- OnPreventDeletingRecordWithOpenApprovalEntryElseCase subscribes to Codeunit "Approvals Mgmt." OnPreventDeletingRecordWithOpenApprovalEntryElseCase
- OnPreventInsertRecIfOpenApprovalEntryExistElseCase subscribes to Codeunit "Approvals Mgmt." OnPreventInsertRecIfOpenApprovalEntryExistElseCase
- DeleteApprovalEntriesAfterDeleteSustJournalBatch subscribes to Table "Sustainability Jnl. Batch" OnAfterDeleteEvent

## Procedures

- `ApproveSustJournalLineRequest(SustJournalLine: Record "Sustainability Jnl. Line")` (internal)
- `RejectSustJournalLineRequest(SustJournalLine: Record "Sustainability Jnl. Line")` (internal)
- `DelegateSustJournalLineRequest(SustJournalLine: Record "Sustainability Jnl. Line")` (internal)
- `TrySendJournalBatchApprovalRequest(var SustJournalLine: Record "Sustainability Jnl. Line")` (internal)
- `TryCancelJournalBatchApprovalRequest(var SustJournalLine: Record "Sustainability Jnl. Line")` (internal)
- `IsSustJournalBatchApprovalsWorkflowEnabled(var SustJournalBatch: Record "Sustainability Jnl. Batch"): Boolean` (internal)
- `CheckSustJournalBatchApprovalsWorkflowEnabled(var SustJournalBatch: Record "Sustainability Jnl. Batch"): Boolean`
- `HasAnyOpenJournalLineApprovalEntries(JournalTemplateName: Code[20]; JournalBatchName: Code[20]): Boolean` (internal)
- `ShowJournalApprovalEntries(var SustJournalLine: Record "Sustainability Jnl. Line")` (internal)
- `GetSustJnlBatchApprovalStatus(SustJournalLine: Record "Sustainability Jnl. Line"; var SustJnlBatchApprovalStatus: Text[20]; EnabledSustJnlBatchWorkflowsExist: Boolean)` (internal)
- `CleanSustJournalApprovalStatus(SustJournalLine: Record "Sustainability Jnl. Line"; var GenJnlBatchApprovalStatus: Text[20])` (internal)

Plus 6 local procedures.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 1535 "Approvals Mgmt."](../codeunit/1535.md) (17 calls: `ApproveSustJournalLineRequest → ApproveRecordApprovalRequest`, `ApproveSustJournalLineRequest → FindOpenApprovalEntryForCurrUser`, `CleanSustJournalApprovalStatus → FindApprovalEntryByRecordId`, …)
- [Codeunit 1501 "Workflow Management"](../codeunit/1501.md) (2 calls: `CheckSustJournalBatchApprovalsWorkflowEnabled → CanExecuteWorkflow`, `IsSustJournalBatchApprovalsWorkflowEnabled → CanExecuteWorkflow`)
- [Codeunit 27 "Confirm Management"](../codeunit/27.md) (2 calls: `OnPreventDeletingRecordWithOpenApprovalEntryElseCase → GetResponseOrDefault`, `OnPreventInsertRecIfOpenApprovalEntryExistElseCase → GetResponseOrDefault`)
- [Codeunit 6280 "Sust. Workflow Event Handling"](../codeunit/6280.md) (2 calls: `CheckSustJournalBatchApprovalsWorkflowEnabled → RunWorkflowOnSendSustJournalBatchForApprovalCode`, `IsSustJournalBatchApprovalsWorkflowEnabled → RunWorkflowOnSendSustJournalBatchForApprovalCode`)
- [Page 658 "Approval Entries"](../page/658.md) (1 call: `ShowJournalApprovalEntries → (object)`)

## Called by

- [Page 6219 "Sustainability Journal"](../page/6219.md) (3 calls: `OnAfterGetCurrRecord → GetSustJnlBatchApprovalStatus`, `OnModifyRecord → CleanSustJournalApprovalStatus`, `SetApprovalStateForBatch → HasAnyOpenJournalLineApprovalEntries`)
- [Codeunit 6280 "Sust. Workflow Event Handling"](../codeunit/6280.md) (1 call: `RestrictSustJournalLine → IsSustJournalBatchApprovalsWorkflowEnabled`)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Sust. Approvals Mgmt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
