ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Event Request - Workflow Management

Open JacopoMuzziCapBS opened this issue 5 years ago • 4 comments

We need to perform some actions before standard code in Workflow management in Codeunit "Approvals Mgt." (1535), Function ApproveSelectedApprovalRequest

ApprovalEntry.Validate(Status, ApprovalEntry.Status::Approved); ApprovalEntry.Modify(true); //Added OnBeforeOnApproveApprovalRequest(ApprovalEntry); //Added OnApproveApprovalRequest(ApprovalEntry);

image

JacopoMuzziCapBS avatar Apr 23 '21 12:04 JacopoMuzziCapBS

You help us implementing the requests faster when your request contains AL code copied from VSCode instead of screenshots.

StanPesotskiy avatar Apr 23 '21 15:04 StanPesotskiy

[IntegrationEvent(false, false)] local procedure OnBeforeOnApproveApprovalRequest(var ApprovalEntry: Record "Approval Entry") begin end;

JacopoMuzziCapBS avatar Apr 26 '21 08:04 JacopoMuzziCapBS

Sorry for delayed response. It feels strange to add an event before an event with exact same signature. Since it seems like you are trying to do something before the default approval workflow it seems more appropriate to put event in the RunWorkflowOnApproveApprovalRequest procedure in the WorkflowEventHandling Codeunit (1520). Will an OnBeforeRunWorkflowOnApproveApprovalRequest there work for you instead of this?

Stepanenko-Vadim avatar Jun 01 '21 09:06 Stepanenko-Vadim

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

JesperSchulz avatar Jun 04 '21 12:06 JesperSchulz