---
title: "Codeunit 1521 Workflow Response Handling"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/1521-workflow-response-handling/
type: codeunit
id: 1521
name: "Workflow Response Handling"
app: "Base Application"
namespace: System.Automation
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/1521-workflow-response-handling/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 1521 Workflow Response Handling

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/1521-workflow-response-handling/

| | |
| --- | --- |
| App | Base Application |
| Namespace | System.Automation |
| Versions | 17-28 |
| Source file | System/Workflow/WorkflowResponseHandling.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CreateResponsesLibrary | () | - | public | 17-28 | - | - |
| ExecuteResponse | (var Variant, Record Workflow Step Instance, Variant) | - | public | 17-28 | - | - |
| DoNothingCode | () | Code[128] | public | 17-28 | - | - |
| CreateNotificationEntryCode | () | Code[128] | public | 17-28 | - | - |
| ReleaseDocumentCode | () | Code[128] | public | 17-28 | - | - |
| OpenDocumentCode | () | Code[128] | public | 17-28 | - | - |
| SetStatusToPendingApprovalCode | () | Code[128] | public | 17-28 | - | - |
| GetApprovalCommentCode | () | Code[128] | public | 17-28 | - | - |
| CreateApprovalRequestsCode | () | Code[128] | public | 17-28 | - | - |
| SendApprovalRequestForApprovalCode | () | Code[128] | public | 17-28 | - | - |
| ApproveAllApprovalRequestsCode | () | Code[128] | public | 17-28 | - | - |
| RejectAllApprovalRequestsCode | () | Code[128] | public | 17-28 | - | - |
| CancelAllApprovalRequestsCode | () | Code[128] | public | 17-28 | - | - |
| PostDocumentAsyncCode | () | Code[128] | public | 17-28 | - | - |
| PostDocumentCode | () | Code[128] | public | 17-28 | - | - |
| CreatePmtLineForPostedPurchaseDocAsyncCode | () | Code[128] | public | 17-28 | - | - |
| CreatePmtLineForPostedPurchaseDocCode | () | Code[128] | public | 17-28 | - | - |
| CreateOverdueNotificationCode | () | Code[128] | public | 17-28 | - | - |
| CheckCustomerCreditLimitCode | () | Code[128] | public | 17-28 | - | - |
| CheckGeneralJournalBatchBalanceCode | () | Code[128] | public | 17-28 | - | - |
| CreateAndApproveApprovalRequestAutomaticallyCode | () | Code[128] | public | 17-28 | - | - |
| ShowMessageCode | () | Code[128] | public | 17-28 | - | - |
| RestrictRecordUsageCode | () | Code[128] | public | 17-28 | - | - |
| AllowRecordUsageCode | () | Code[128] | public | 17-28 | - | - |
| GetMarkReadyForOCRCode | () | Code[128] | public | 17-28 | - | - |
| GetSendToOCRAsyncCode | () | Code[128] | public | 17-28 | - | - |
| GetSendToOCRCode | () | Code[128] | public | 17-28 | - | - |
| GetReceiveFromOCRAsyncCode | () | Code[128] | public | 17-28 | - | - |
| GetReceiveFromOCRCode | () | Code[128] | public | 17-28 | - | - |
| GetCreateDocFromIncomingDocCode | () | Code[128] | public | 17-28 | - | - |
| GetCreateReleasedDocFromIncomingDocCode | () | Code[128] | public | 17-28 | - | - |
| GetCreateJournalFromIncomingDocCode | () | Code[128] | public | 17-28 | - | - |
| RevertValueForFieldCode | () | Code[128] | public | 17-28 | - | - |
| ApplyNewValuesCode | () | Code[128] | public | 17-28 | - | - |
| DiscardNewValuesCode | () | Code[128] | public | 17-28 | - | - |
| SetStatusToPendingApproval | (var Variant) | - | public | 17-28 | - | - |
| AddResponseToLibrary | (Code[128], Integer, Text[250], Code[20]) | - | public | 17-28 | - | - |
| AddResponsePredecessor | (Code[128], Code[128]) | - | public | 17-28 | - | - |
| GetDescription | (Record Workflow Step Argument) | Text[250] | public | 17-28 | - | - |
| IsArgumentMandatory | (Code[128]) | Boolean | public | 17-28 | - | - |
| HasRequiredArguments | (Record Workflow Step) | Boolean | public | 17-28 | - | - |
| GetApproveOverReceiptCode | () | Text[128] | public | 17-28 | - | - |
| EnableJobQueueEntryCode | () | Code[128] | public | 22-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAddWorkflowResponsesToLibrary | () | 17-28 | - | - |
| Integration event | OnAddWorkflowResponsePredecessorsToLibrary | (Code[128]) | 17-28 | - | - |
| Integration event | OnExecuteWorkflowResponse | (var Boolean, var Variant, Variant, Record Workflow Step Instance) | 17-28 | - | - |
| Integration event | OnAfterGetWorkflowResponseDescription | (var Record Workflow Response, var Record Workflow Step Argument, var Text[250]) | 17-28 | - | - |
| Integration event | OnBeforeAddResponseToLibrary | (Code[128], Text[250]) | 17-28 | - | - |
| Integration event | OnBeforeAllowRecordUsageDefault | (var Variant, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeReleaseDocument | (var Variant) | 17-28 | - | - |
| Integration event | OnOpenDocument | (RecordRef, var Boolean) | 17-28 | - | - |
| Integration event | OnReleaseDocument | (RecordRef, var Boolean) | 17-28 | - | - |
| Integration event | OnCheckIsArgumentMandatory | (Code[128], var Boolean) | 17-28 | - | - |
| Integration event | OnCheckHasRequiredArguments | (Record Workflow Step, Record Workflow Step Argument, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeCreateNotificationEntry | (Record Workflow Step Instance, Record Approval Entry, var Boolean) | 19-28 | - | - |
| Integration event | OnBeforeExecuteResponse | (var Variant, Record Workflow Step Instance, Variant, var Boolean) | 19-28 | - | - |
| Integration event | OnBeforeIsArgumentMandatory | (Code[128], var Boolean, var Boolean) | 19-28 | - | - |
| Integration event | OnAfterAllowRecordUsage | (Variant, var RecordRef) | 20-28 | - | - |
| Integration event | OnAfterGetDescription | (Record Workflow Step Argument, Record Workflow Response, var Text[250]) | 20-28 | - | - |
| Integration event | OnPostDocumentOnCaseElse | (RecordRef, var Boolean) | 20-28 | - | - |
| Integration event | OnShowMessageOnBeforeShowMessage | (Record Workflow Step Argument, var Boolean) | 23-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
