---
id: object/codeunit/6280
type: object
title: Codeunit 6280 "Sust. Workflow Event Handling"
summary: Codeunit 6280 "Sust. Workflow Event Handling" in Sustainability (Microsoft.Sustainability.Workflow). 4 public procedures, 18 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: 9de09834c832cdc1b09c7e2bd4671a4e7456d0091a7ff5430b6c7af5931e466d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Sustainability/app/src/Workflow/SustWorkflowEventHandling.Codeunit.al
    title: src/Apps/W1/Sustainability/app/src/Workflow/SustWorkflowEventHandling.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: 6280
name: Sust. Workflow Event Handling
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: 31
  events: 0
  subscribers: 18
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 7
  called_by: 2
  implements: 0
---

# Codeunit 6280 "Sust. Workflow Event Handling"

> Codeunit 6280 "Sust. Workflow Event Handling" in Sustainability (Microsoft.Sustainability.Workflow). 4 public procedures, 18 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/SustWorkflowEventHandling.Codeunit.al) · facts from BC29

## Event subscriptions

- AddWorkflowEventsToLibrary subscribes to Codeunit "Workflow Event Handling" OnAddWorkflowEventsToLibrary
- AddWorkflowEventPredecessorsToLibrary subscribes to Codeunit "Workflow Event Handling" OnAddWorkflowEventPredecessorsToLibrary
- OnAfterInsertApprovalsTableRelations subscribes to Codeunit "Workflow Setup" OnAfterInsertApprovalsTableRelations
- AddWorkflowTableRelationsToLibrary subscribes to Codeunit "Workflow Event Handling" OnAddWorkflowTableRelationsToLibrary
- AddWorkflowResponsePredecessorsToLibrary subscribes to Codeunit "Workflow Response Handling" OnAddWorkflowResponsePredecessorsToLibrary
- RunWorkflowOnSendSustJournalBatchForApproval subscribes to Codeunit "Sust. Approvals Mgmt." OnSendSustainabilityJournalBatchForApproval
- RunWorkflowOnCancelSustJournalBatchApprovalRequest subscribes to Codeunit "Sust. Approvals Mgmt." OnCancelSustainabilityJournalBatchApprovalRequest
- OnAddWorkflowCategoriesToLibrary subscribes to Codeunit "Workflow Setup" OnAddWorkflowCategoriesToLibrary
- InsertWorkflowTemplates subscribes to Codeunit "Workflow Setup" OnAfterInitWorkflowTemplates
- InsertRequestPageFields subscribes to Codeunit "Workflow Request Page Handling" OnAfterInsertRequestPageFields
- RemoveSustJournalBatchRestrictionsBeforeDelete subscribes to Table "Sustainability Jnl. Batch" OnBeforeDeleteEvent
- RemoveSustJournalLineRestrictionsBeforeDelete subscribes to Table "Sustainability Jnl. Line" OnBeforeDeleteEvent
- UpdateSustJournalBatchRestrictionsAfterRename subscribes to Table "Sustainability Jnl. Batch" OnAfterRenameEvent
- RestrictSustJournalLineAfterInsert subscribes to Table "Sustainability Jnl. Line" OnAfterInsertEvent
- RestrictSustJournalLineAfterModify subscribes to Table "Sustainability Jnl. Line" OnAfterModifyEvent
- OnAfterCheckSustainabilityJournalLine subscribes to Codeunit "Sustainability Jnl.-Check" OnAfterCheckSustainabilityJournalLine
- OnBeforeAllowRecordUsageDefault subscribes to Codeunit "Workflow Response Handling" OnBeforeAllowRecordUsageDefault
- OnConditionalCardPageIDNotFound subscribes to Codeunit "Page Management" OnConditionalCardPageIDNotFound

## Procedures

- `RunWorkflowOnSendSustJournalBatchForApprovalCode(): Code[128]` (internal)
- `RunWorkflowOnCancelSustJournalBatchApprovalRequestCode(): Code[128]` (internal)
- `SustJournalBatchApprovalWorkflowCode(): Code[17]` (internal)
- `AllowSustJournalBatchUsage(SustJournalBatch: Record "Sustainability Jnl. Batch")` (internal)

Plus 9 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 1502 "Workflow Setup"](../codeunit/1502.md) (18 calls: `AddWorkflowTableRelationsToLibrary → InsertTableRelation`, `BuildSustJournalBatchTypeConditionsFromRec → Encode`, `InsertSustJnlBatchApprovalWorkflowSteps → BuildNoPendingApprovalsConditions`, …)
- [Codeunit 1521 "Workflow Response Handling"](../codeunit/1521.md) (12 calls: `AddWorkflowResponsePredecessorsToLibrary → AddResponsePredecessor`, `AddWorkflowResponsePredecessorsToLibrary → CancelAllApprovalRequestsCode`, `AddWorkflowResponsePredecessorsToLibrary → CreateApprovalRequestsCode`, …)
- [Codeunit 1520 "Workflow Event Handling"](../codeunit/1520.md) (8 calls: `AddWorkflowEventPredecessorsToLibrary → AddEventPredecessor`, `AddWorkflowEventPredecessorsToLibrary → RunWorkflowOnApproveApprovalRequestCode`, `AddWorkflowEventPredecessorsToLibrary → RunWorkflowOnDelegateApprovalRequestCode`, …)
- [Codeunit 1550 "Record Restriction Mgt."](../codeunit/1550.md) (6 calls: `AllowSustJournalBatchUsage → AllowRecordUsage`, `CheckRecordHasUsageRestrictions → CheckRecordHasUsageRestrictions`, `RemoveSustJournalBatchRestrictionsBeforeDelete → AllowRecordUsage`, …)
- [Codeunit 1501 "Workflow Management"](../codeunit/1501.md) (2 calls: `RunWorkflowOnCancelSustJournalBatchApprovalRequest → HandleEvent`, `RunWorkflowOnSendSustJournalBatchForApproval → HandleEvent`)
- [Codeunit 1522 "Workflow Request Page Handling"](../codeunit/1522.md) (1 call: `InsertRequestPageFields → InsertDynReqPageField`)
- [Codeunit 6279 "Sust. Approvals Mgmt."](../codeunit/6279.md) (1 call: `RestrictSustJournalLine → IsSustJournalBatchApprovalsWorkflowEnabled`)

## Called by

- [Codeunit 6279 "Sust. Approvals Mgmt."](../codeunit/6279.md) (2 calls: `CheckSustJournalBatchApprovalsWorkflowEnabled → RunWorkflowOnSendSustJournalBatchForApprovalCode`, `IsSustJournalBatchApprovalsWorkflowEnabled → RunWorkflowOnSendSustJournalBatchForApprovalCode`)
- [Page 6219 "Sustainability Journal"](../page/6219.md) (1 call: `SetApprovalStateForBatch → RunWorkflowOnSendSustJournalBatchForApprovalCode`)

## 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. Workflow Event Handling")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
