ALAppExtensions
ALAppExtensions copied to clipboard
[W1][Codeunit][1502][Workflow Setup] OnBeforeInsertDocApprovalWorkflowSteps event
Why do you need this change?
I would like to request the addition of a new event, OnBeforeInsertDocApprovalWorkflowSteps, in codeunit 1502 'Workflow Setup'. This event is required to several purposes:
- To add a new response step (InsertResponseStep call). This step allows all approval requests to be approved at the company level.
- Additional notification response added for approved requests, ensuring notifications are created for the sender after the custom Approve by Company workflow step or upon rejection. Add logic to ensure notifications are sent upon the approval or rejection of requests.
Thank you for considering this request.
Describe the request
This change is needed in BC25. Proposed Event Code:
[W1][Codeunit][1502][Workflow Setup] OnBeforeInsertDocApprovalWorkflowSteps()
___
This event is necessary to allow all approval requests to be approved at the company level, and to add a notification response for approved requests.
___
[IntegrationEvent(true, false)] local procedure OnBeforeInsertDocApprovalWorkflowSteps(
var sender: Codeunit "Workflow Setup";
Workflow: Record Workflow;
DocSendForApprovalConditionString: Text;
DocSendForApprovalEventCode: Code[128];
DocCanceledConditionString: Text;
DocCanceledEventCode: Code[128];
WorkflowStepArgument: Record "Workflow Step Argument";
ShowConfirmationMessage: Boolean; var IsHandled: Boolean)
begin
end;
Proposed Event Placement:
procedure InsertDocApprovalWorkflowSteps(Workflow: Record Workflow; DocSendForApprovalConditionString: Text; DocSendForApprovalEventCode: Code[128]; DocCanceledConditionString: Text; DocCanceledEventCode: Code[128]; WorkflowStepArgument: Record "Workflow Step Argument"; ShowConfirmationMessage: Boolean)
...
begin
IsHandled := false;
OnBeforeInsertDocApprovalWorkflowSteps(Workflow, DocSendForApprovalConditionString, DocSendForApprovalEventCode, DocCanceledConditionString, DocCanceledEventCode, WorkflowStepArgument, ShowConfirmationMessage, IsHandled);
if IsHandled then
exit;
SentForApprovalEventID := InsertEntryPointEventStep(Workflow, DocSendForApprovalEventCode);
...
end;
Internal work item: AB#602713
This is marked as won't fix. Closing as not planned