Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Approval User Group

(1) ShareShare
ReportReport
Posted on by

I want a setup where any one of the approvers in an approval group can approve a document instead of all of them, in a single level.

*This post is locked for comments

  • Andrew Cooper Profile Picture
    Andrew Cooper 105 on at
    RE: Approval User Group

    There is a way, but only a one sequence level in each workflow.

    If this has not been answered, know this is an old query, then let me know and will explain

  • RE: Approval User Group

    Hello,

    I am trying to configure it on NAV 2016 but it ain't work for me.

    I followed your steps but after the first approval user accepted document is still pending for approval.

    Did you find some another solutions?

    Regards

  • Suggested answer
    Tina Menezes Profile Picture
    Tina Menezes 2,580 on at
    RE: Approval User Group

    Welcome Royce. So on the OnModify() trigger of the base table, You can write code to make the 'userIDapproved' field blank which I suggested above that you should be creating in your base table.

    OnModify()

    Rec.userIDapproved := '';

    Note: They are two single quotes which I have mentioned above.

    So if the field becomes blank, it will again populate the field which the next approver with the code approach I have suggested above.

  • Royce Lithgo Profile Picture
    Royce Lithgo on at
    RE: Approval User Group

    Many thanks Tina. What if the user reopens the document to make further changes and then resubmits for approval?

    In this instance, the previous approver should be cleared so that the new approver id is saved. 

  • Tina Menezes Profile Picture
    Tina Menezes 2,580 on at
    RE: Approval User Group

    Royce,

    "Apply the new values" response will update the field every time a user approves it. It will not reflect only the first user who approved the document but update it every time. So a more preferrable way to get the result that you want to accomplish will be to do it using the coding approach that I suggested above.

  • Royce Lithgo Profile Picture
    Royce Lithgo on at
    RE: Approval User Group

    Tina,

    Thanks for the suggestion. Would it be possible to accomplish this without code?

    If I added the "Approver ID" field to the table, could i use an "Apply the new values" response and set the "Approver ID" field to the value of the person who did the approval?

    2017_2D00_07_2D00_26_5F00_08h00_5F00_20.png

  • Suggested answer
    CDsilva Profile Picture
    CDsilva 4,184 on at
    RE: Approval User Group

    Hi Royce,

    My answer was your question where even if one approver user approves the document, the document must be approved and must be reflected in the status of the document.

    If you want to identify which user has approved your document, you will have to create a  field 'Last modifed by' and assign it to USERID in the OnModify trigger of you record.

    e.g

    LastModifiedBy:=USERID;

  • Tina Menezes Profile Picture
    Tina Menezes 2,580 on at
    RE: Approval User Group

    Royce,

    If you want to know the exact user who approved it, do the following:

    You need to create a new 'userIDapproved' field in your base table.

    You can create a new function in a codeunit with Event: Subscriber, EventPublisherObject: Codeunit Approvals Mgmt. and event function 'OnApproveApprovalRequest and add the following code to populate the new field created:

    If BaseTable.userIDapproved<>'' then begin

    BaseTable.userIDapproved := USERID;

    BaseTable.MODIFY(TRUE);

    END;

    So only the first user who approved the document will be reflected in the 'userIDapproved' field of your base table, after that it will not be modified.

    So it will be populated with the user who approved the document at that time.

  • Royce Lithgo Profile Picture
    Royce Lithgo on at
    RE: Approval User Group

    Chris,

    I don't follow you explanation. I already have it working based on the original response from HoangNam and some additional modifications I made (as per above). 

    This solution works with Rejections (first person to reject wins) and delegations (person delegating to can approve just like anyone else in the group can). The only limitation of this solution is that you cannot identify from the document's approval entries who in the group actually approved it as it lists all group members as approving at the exact timestamp.

  • Suggested answer
    CDsilva Profile Picture
    CDsilva 4,184 on at
    RE: Approval User Group

    Hi Royce,

    You can use workflow user group and enter your users in it.

    Follow the below steps.

    1. Set the Pending Approval to >1 and add response to it

    2. on the next line, Increase Indent  and set the condition to Pending approval: 1 and set the response to it as release.

    3.On the next line, Decrease Indent and set the condition to Pending approval : 1 and set the response

    This will approve the document even if one of the user approves it

    2335.wf.JPG

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans