AX2012: Approval limits & Managerial Hierarchy

In this post, I’m presenting how the approval limits can be used in the workflows to route the business documents to specific line manager based on his approval limit.

Those who are directly landed to this post, my sincere suggestion is to see the posts “Signing limits in AX2012” & Managerial Hierarchy in workflows to have the complete understanding on “Signing limits setups”. This post is an extension to the previous ones.

Below image helps to understand the approval limits that are set to the jobs and hence applied to the respective employees through their positions.
AX2012-spend&Approval Limits
Scenario: James submits a Purchase requisition for $3000 which is more than the spending limit allowed to his level. Adam is immediate manager to James, however the approval limit to Adam is $2000, so that the workflow should route the purchase requisition to Alex whose approval limit is $4000.

Below is how the position needs to be built and employees must be linked to the positions.
Positions-AX2012

Set up the spending & approval limits to Jobs – Go to Organization administration>Setup>Signing limits> Signing Limit policies
Select the “Default signing limit rule” and set up the limits as shown in the below image.
Approval Limits

Workflow configuration for Approval Limits:
As we’ve seen in the previous post, select the “Assignment type” – hierarchy in the “approval step” and in “hierarchy selection” tab, select”Managerial Hierarchy”.

With this setup, the submitted purchase requisition document will be routed to Adam, Alex and then to sunny.

But, our requirement is that if the purchase requisition that is submitted by James is $3000, it shouldn’t go to Adam(Team Lead) as it’s beyond his approval limit.

Workflow – Hierarchy options – Exclude users with the following condition:

In Hierarchy options tab, select “Exclude users with the following condition” then use the below condition.

Employee.ApprovalLimit.Purchase requisition < purchase requisition.approval amount.
So that, when then retrieved employee in the hierarchy doesn't meet the above condition, he will be skipped for the approval.
Hierarchy Options

Now, raise a purchase requisition as James for $3000, and see the result that it will be directly routed to “Alex” -Manager.

Scenario: To stop the approval process with “Single approver” in the managerial hierarchy. What i mean is, once the first approver (whose approval limit is in range with the Purchase requisition amount) approves it, the document shouldn’t go to the next approver in the hierarchy.

In our example,Once Alex approves the Purchase requisition it should not go to “Sunny- Unit head”.

Hopefully I can return the favour: with regard to stopping the managerial hierarchy. I have been using PO approvals but it should apply to the others as well. Try using the following:

Hierarchy selection: Employee.Approval limit.Purchase requisition=> Field – Purchase requisition.approval amount
Hierarchy options: Assign only to last user retrieved

Incorporating this scenario With the help of a reader “Barry’. Thanks “Barry”

Hope you will like reading it. Keep visiting and keep experimenting with me ;). My next post will be on “Posting definitions in AX2012” which will be used for “Budget – Pre encumberances”

Happy DAXing.

Advertisements

23 thoughts on “AX2012: Approval limits & Managerial Hierarchy

  1. Thank you for your post.
    I believe that you can manage the single approver scenario using the option “Assign only to the last approver retrived” and negating the condition (ie. Employee approval limit >= PR approval amount)

    • Giancarlo, Thanks for liking the post. About your suggestion on single approver scenario, we can’t specify the condition if we select “Assign only to the last approver retrieved”, the condition can be specified only when the option “Exclude users with following condition” is selected.

  2. You are right. But you can specify the condition in the hierarchy selection form (Managerial Hierarchy, starting from requester, condition Approval limit <= Approval Amount).

  3. Hi,

    I think the solution is:
    – Delete the condition in the ‘Hierarchy options” tab and check “Assign to all users retrieved” instead of “Exclude users with following condition”
    – and in the “Hierarchy selection” tab, add in “Stop when the following condition is met” the following condition”:
    “Where Employee Approval limit.Purchase Requisition >= field of “Purchase Requisition.Approval amount excl tax”.

    With that if the senario is:

    James submits a Purchase requisition for $3000.

    ==> The workflow will route the purchase requisition to Alex whose approval limit is $4000. And once Alex approves it the “PR status” will be shown as “Approved”

    • Thanks caroline,the suggested solution will not work out.If we dont select “Exclude users with the following conditions”, the requisition will be assigned to all the users until the condition breaks. With the above condition it goes to “Adam” first and then to “Alex”. Our intention is to route it to only “Alex”

  4. Many thanks for this blog, it has helped save me a lot of time. Hopefully I can return the favour: with regard to stopping the managerial hierarchy. I have been using PO approvals but it should apply to the others as well. Try using the following:

    Hierarchy selection: Employee.Approval limit.Purchase order => Field Purchase order.Balance
    Hierarchy options: Assign only to last user retrieved

    • Hi Barry,

      I am looking for the field like `Purchase order.Balance` in sales order.
      Do you know what is the field like `Purchase order.Balance` in sales order ??

      Or if you know where the field `Purchase order.Balance` is stored on Table, View, etc. ? Please enlight me.

  5. Hi, glad it worked for you. The one concern is that I cannot get escalation to work if the approver fails their time constraint as using Workflow originator creates a circular reference, and Workflow owner isn’t appropriate in my scenario.

  6. Is there a way in AX 2012 for an a user with the Employee Role only to see Purchase requistions put in by another user who also only has the Employee Role? Reason is, I have a new user replacing one that is going on mat leave and she needs to see historical PR’s that her replacement put in so that she only needs to change a few fields when submitting a new PR. Basically using a previous one as a template. Thanks

    • Dave I’m sorry for the late reply, I was on vacation. I dont know whether if you already found the solution.

      currently which form is being used by your users? is it “Purchase requisitions prepared by me” form?

      If so, i suggest giving the access to “All purchase requisitions” form and use the “record level security” and create the query with “created by” field = olduser, new user. When the new user open the form “he should be able to see the PRs created by him/her and the previous employee.

      Let me know if you need any help.

  7. Many thanks Sunny for this Post.
    I followed it step by step but I don’t success to run the workflow.
    the requisition is still sending to my manager (level 1) …
    i forgot somethings ?
    Thank you

  8. Hi,
    Can u help me creating a purchase order approval workflow using hierarchy. I tried creating signing limits of document type Purchase Order but my workflow throws error. The error is below:
    Stopped (error): X++ Exception: Worker ID not set or record not found for %1, %2. Verify that the extended data type matches, and that the worker exists.
    at SysWorkflowHierarchyProvider-resolve
    SysWorkflowHierarchyProvider-resolveHierarchy
    SysWorkflowQueue-resume

    The conditions for workflow are:
    PO below $100 don’t require any approval
    PO above $100 and less than $1,000 require approval from a Sr. Manager
    PO above $1,000 and less than $10,000 require approval from Sr. Manager AND a Vice President.
    I have set Assignment type Hierarchy and stop condition as: Employee.ApprovalLimit.PurchaseOrder>= PurchaseOrder.InvoiceAmount
    My hierarchy is working fine for purchase requisition.

    • Vivek,

      I was thinking whether any problem with the hierarchy that you defined. But, when you say it is working fine for PR, the only way is to sit with your developer and help you out on this. Also, get the workflow reviewed by your peers..sometimes we might have missed a very small thing.

      Regards,
      Santosh

  9. Hi,
    How to create purchase order approval workflow using hierarchy with the following conditions:
    PO below $100 don’t require any approval
    PO above $100 and less than $1,000 require approval from a Manager
    PO above $1,000 and less than $10,000 require approval from Sr. Manager AND a Vice President.

    I have assigned both Sr. Manager and Vice President same signing limit of $10,000 but my workflow completes after getting approval from Sr. Manager. It does not go to Vice President for approval.
    In hierarchy Sr. Manager reports to Vice President.

    I have set Assignment type Hierarchy and stop condition as: Employee.ApprovalLimit.PurchaseOrder >= PurchaseOrder.InvoiceAmount.

  10. I tried this with expenses but does not see to work , if i select option “exclude workers” i get circular dependency error and if i select last user retrieved , same circular dependency error and if i select first option retrieve all users then, workflow approver keeeps on rotating on the first approver(i.e to direct reporting person), any help on this is much appreciated!!!

  11. Hi sunnysanthu,
    If i select the option “Assign to all the users retrieved” the approval goes to the “Manager”, the first signing limit approver. My PO amount is 5000$ so it should directly go to the Sr. Manager and Vice President for approval.
    I have set Assignment type Hierarchy and stop condition as: Employee.ApprovalLimit.PurchaseOrder >= PurchaseOrder.InvoiceAmount

  12. I used below setting for my expense report workflow. but it fails & stops for some of the employees and not getting assigned to anyone.

    Hierarchy selection: Employee.Approval limit.Expense Report > Field – Expense report.Total Expense report amount
    Hierarchy options: Assign only to last user retrieved
    —————————————————————
    Workflow stopped error is

    Stopped (error): X++ Exception: The WorkflowHierarchyProvider implementation has a circular dependency.
    at SysWorkflowHierarchyProvider-resolve
    SysWorkflowHierarchyProvider-resolveHierarchy
    SysWorkflowQueue-resume

    —————————————————————–

    What could be the reason.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s