Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

multistep approval - per step multiple approvers

Posted on by 85

Hi,

For purchase orders we have set up an approval flow that requires a 3 step approval.  We configured it as below:

  • Create workflow from template
  • Create workflow user group with 3 sequences
  • define the workflow user group in the workflow

So far, so good...

Next level:

Per sequence step we want the define multiple approvers

Sequence 1:

  • Apporver 1
  • Approver 2
  • Approver 3

Sequence 2:

  • Approver 4
  • Approver 5
  • Approver 6

Sequence 3:

  • Approver 7
  • Approver 8
  • Approver 9

Is it possible for each step dat only one of the approvers must approve so the next sequence is activated?

Thanks and kind regards

Bert Lievens

  • bert L Profile Picture
    bert L 85 on at
    RE: multistep approval - per step multiple approvers

    I was thinking the same.  But for each sequence all users must approve before the next sequence can start

  • bert L Profile Picture
    bert L 85 on at
    RE: multistep approval - per step multiple approvers

    if you have only set up 1 sequence workflow user group, this is indeed doable.

    But after the first sequence, the second secuence should start.  I was playin with conditions and actions without any result.

    More suggestions?

  • Jun Wang Profile Picture
    Jun Wang 7,437 Super User 2024 Season 2 on at
    RE: multistep approval - per step multiple approvers

    this is doable and I did in the past. below is the detailed info but in NAV example, BC is the same way.

    here is the link I referenced to previous, it quite easy to follow

    https://www.navug.com/blogs/kevin-fons/2017/08/02/introduction-to-the-workflow-user-groups

  • Suggested answer
    Tech-Lucky Profile Picture
    Tech-Lucky 796 on at
    RE: multistep approval - per step multiple approvers

    if you want that any one of the three approve can approve and the other 2 don't need to approve the same document then this is possible by base system like below

    Create a single Workflow User Group

    suppose you have user A user B user C for Sequence 1 and User D user E user F for Sequence 2 then you can create a workflow user Group like :

    User A  -- Seq - 1 

    User B -- Seq - 1

    User C -- Seq - 1 

    User D  -- Seq - 2 

    User E -- Seq - 2

    User F -- Seq - 2

    ... and so on but once any single user A , B or C approves the document first the document will further move to sequence 2.

     

    mark this answer as varified if this was helpful.

  • Suggested answer
    RE: multistep approval - per step multiple approvers

    Hi bert L,

    This cannot be done by mapping as per the base product. You need to add code to the workflow. Without customization, I don't think it can be achieved.

    You can add this event to your existing codeunit in your project:

    ---------------------

        [EventSubscriber(ObjectType::Codeunit, Codeunit::"Approvals Mgmt.", 'OnApproveApprovalRequest', '', true, true)]

        local procedure YSRSEQ_OnApproveApprovalRequest(var ApprovalEntry: Record "Approval Entry")
        var
            recApprovalEntry: Record "Approval Entry";
        begin
            recApprovalEntry.RESET;
            recApprovalEntry.SETRANGE("Record ID to Approve", ApprovalEntry."Record ID to Approve");
            recApprovalEntry.SETRANGE("Sequence No.", ApprovalEntry."Sequence No.");
            recApprovalEntry.SETRANGE("Workflow Step Instance ID", ApprovalEntry."Workflow Step Instance ID");
            recApprovalEntry.MODIFYALL("Last Modified By User ID", ApprovalEntry."Last Modified By User ID", FALSE);
            recApprovalEntry.MODIFYALL(Status, ApprovalEntry.Status);
        end;

    ---------------------

    Regards,

    Yogender Singh Rana

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans