Open Forum

Like what you see? Discover the benefits of the GPUG Community. Learn More

Directing Workflow depending on the submitter

  • 1.  Directing Workflow depending on the submitter

    Posted 18 days ago
    Hello.

    We are using Dynamics GP 2016. I have a workflow for Purchase Orders setup like so:

    If PO < $2,000 then the approver is Person-A
    If PO between $2,000 and $10,000 then the approver is Person-B
    If PO is > $10,000 then the approver is Person-C

    This setup works fine, but I'd like to add a condition to check the name of the person submitting the PO.

    So if the PO is submited by Person-A and < $2,000, then it will skip the first group. Another way to say this is:

    If PO < $1,000 and Submitted by NOT= "Person-A" then the approver is Person-A


    I've tried to use the condition "Purchase Order Line.Requested By" but this has not had the desired result.

    Thanks in advance for any help.

    ------------------------------
    Daniel Jones
    Global Products, Inc.
    St. Peters
    ------------------------------


  • 2.  RE: Directing Workflow depending on the submitter

    GPUG ALL STAR
    Posted 15 days ago
    @Daniel Jones,

    The PO Workflow​ we concocted uses the 'Purchase Order Work.Buyer ID' to sort out who ordered what. For example:

    where Purchase Order Work.Buyer ID is 'abc'
    and Purchase Order Work.Subtotal is greater than and includes 1000.00000
    and Purchase Order Work.Subtotal is less than and includes 4999.99000
    or Purchase Order Work.Buyer ID is 'def'
    and Purchase Order Work.Subtotal is greater than and includes 1000.00000
    and Purchase Order Work.Subtotal is less than and includes 4999.99000

    We've got several branches to separate Buyers from different departments with varying levels of PO approvals (<$5000, <$10,000, <$25,000, etc.)

    Does this help?

    SIncerely,

    ------------------------------
    "Sparkly" Steve Erbach - QMS Manager and Business Development Analyst
    GLC Minerals, LLC - Green Bay, WI
    Co-Chair, GPUG WI (Green Bay) Chapter
    GP 2016 R2 (16.00.0579) / MR 2012 CU16
    Blog: https://www.gpug.com/blogs/steve-erbach
    Twitter: twitter.com/serbach
    ------------------------------
    Welcome to Dynamics!
    You do not have permission.
    Call Steve.
    (hat tip: Lou Spevack)
    ------------------------------



  • 3.  RE: Directing Workflow depending on the submitter

    SILVER CONTRIBUTOR
    Posted 15 days ago
    I don't know that the Requested By field gets populated for a purchase order like it does with a purchase requisition. Looking at my POP10110 table, I don't see the REQSTDBY populated, so I guess I would start there on your environment, as my thoughts are that it is going to be empty, which is why the approval condition isn't working as you'd expect.

    With the PO Approval workflow, we pretty much, by default, will have the fields are on the actual PO Entry window, which doesn't really use a Requested By field, like the purchase requisition entry window does.

    The options we appear to have are Buyer ID, PO Number, Comment ID, etc., admittedly not a lot to use.

    The only thing I think I've seen other customers use for PO entries to try and differentiate from different users/originators, is a Buyer ID, or in the PO Number itself.

    If there's something in a related table that shows the originator's user ID, you could potentially extend the Workflow Condition Editor using the 'QueryDesignerAllFunctionality=TRUE' line in Dex.ini, which would allow you to setup table/field queries to use as a workflow approval condition, then add the PO amount values as well to decide approval routing.

    Others on this forum may have other options they've tried and gotten to work as well.

    Thanks

    ------------------------------
    Derek Albaugh
    Sr. Support Engineer
    Microsoft
    Moorhead MN
    ------------------------------



  • 4.  RE: Directing Workflow depending on the submitter

    TOP CONTRIBUTOR
    Posted 15 days ago
    Edited by Rob Klaproth 15 days ago
    Derek, in my testing with 2018R2 the requested by does get populated automatically if the PO was converted from a requisition, but if you enter a PO in GP manually it does not.

    Rob

    ------------------------------
    Rob Klaproth
    Dynamics Certified Professional
    (GP Install & Configure)
    Sr. GP Consultant
    Armanino, LLP
    San Diego, CA
    ------------------------------



  • 5.  RE: Directing Workflow depending on the submitter

    SILVER CONTRIBUTOR
    Posted 14 days ago
    ​To add onto Derek's post - the Workflow_Originator field in WFI10002 sounds like what you are looking for and can be added with the advanced condition editor, but testing would need to be done to see if this table is populated prior to each step record being created for this to work.  Would also need to deal with a single PO being submitted multiple times therefore having multiple records in this table.  This may lead to a solution but would need to be developed and tested to see if it could work.  I'd be curious to hear the outcome if tested.

    ------------------------------
    John Kirsch
    Manager
    Wipfli
    Green Bay WI
    ------------------------------



  • 6.  RE: Directing Workflow depending on the submitter

    TOP CONTRIBUTOR
    Posted 15 days ago
    Edited by Rob Klaproth 15 days ago
    The field is called requested by.  You will see it on the PO Req Entry screen defaulting to the user who created the requisition, and it's greyed out so the user can't change it (although honestly it would be nice if they would let you change it if you're an office admin who enters purchase requests on behalf of your boss).

    Add the condition and requested by = "username" to each one of your conditions and then it will only fire off it that person enters the req.

    You can use AND with OR by the way so you can say:

    Amount <= 5000 and requested by = rklaproth
    OR
    Amount <= 5000 and requested by = jdoe
    OR
    Amount <=5000 and requested by = bmcad

    It would be nice if we could do something like this:
    Amount <= 5000 and requested by IN rklaproth, jdoe, mcad

    But unfortunately it does not let you use that SQL operator called IN and it does not let you use contains with comma separators.

    The nice thing though is if rklaproth leaves and jsmith replaces you can go back and edit the condition instead of having to create it all over again. :)

    Remember, when deploying work flow you have to make sure you have someone trained in HR or IT to maintain it so when people leave or join the company you can keep this up to date - unless you're going to own it. :)

    FYI I submitted a product suggestion to allow multiple conditions on the same condition:
    Workflow conditions multiple values in a single condition separated by comma
    Experience Dynamics 365 remove preview
    Workflow conditions multiple values in a single condition separated by comma
    In most query tools today you can have multiple values in a single condition.
    View this on Experience Dynamics 365 >



    ------------------------------
    Rob Klaproth
    Dynamics Certified Professional
    (GP Install & Configure)
    Sr. GP Consultant
    Armanino, LLP
    San Diego, CA
    ------------------------------



  • 7.  RE: Directing Workflow depending on the submitter

    Posted 6 days ago
    Thanks to everyone for their replies!

    What I found was that using

    "and Purchase Order Work.User To Enter contains 'username'"

    was what I needed.

    @Steve; the buyer ID is not always the person submitting the PO, so that would not work. But thanks!
    @Derek and @Rob; you are correct, reqstdby does not get populated for Transaction Entry like it does for PO's
    @John; perhaps I missed, but Workflow_Originator field was not available the conditions, so I could not test your suggestion.

    Thanks again for all the input!

    ------------------------------
    Daniel Jones
    Global Products, Inc.
    St. Peters
    ------------------------------