web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

Custom Approval Workflows in AL Guide

(0) ShareShare
ReportReport
Posted on by 249

Hello,

Any guide for custom approval workflows in Dynamics 365 BC AL Extensions ?

Categories:
I have the same question (0)
  • Suggested answer
    Roberto Stefanetti Profile Picture
    12,998 on at
  • dickson kimeu Profile Picture
    249 on at

    Am using AL for new approvals workflows.

    Approvals table has fixed document types. how can i add more ?

    Also,,,

    I have afew failure points. Below code doesn't populate to approvals tables the document no etc

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Approvals Mgmt.",
    'OnPopulateApprovalEntryArgument', '', false, false)]
    procedure PopulateApprovalEntryArgument(
    RecRef: RecordRef;
    ApprovalEntryArgument: Record "Approval Entry")
    var
    QCRec: Record "QC";
    begin
    CASE RecRef.Number of
    DATABASE::"QC":
    begin
    RecRef.SetTable(PurchaseReq);
    ApprovalEntryArgument."Document Type" := QCRec."Document Type";
    ApprovalEntryArgument."Document No." := QCRec."QCRec No.";
    ApprovalEntryArgument.Amount := QCRec."Expected Total Cost";
    ApprovalEntryArgument."Currency Code" := QCRec."Currency Code";
    end
    END
    end;
    Also, how can i hide approvals buttons from page for users not qualified to approve ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans