This topic contains 11 replies, has 0 voices, and was last updated by Jason Kaulback 8 years, 2 months ago.

  • Author
    Posts
  • #9849

    Jason Kaulback

    Hello,

    I am trying to create a workflow that doesn’t allow a specific Role to edit a Sales Order while it is in the Pending Fulfillment stage. I thought that Lock Record would do that, but it doesn’t appear to work.

    Start:

    Record Type: Transaction

    Release Status: Testing

    Enable Logging: Checked

    Initiation: Event Based

    Definition: On Create

    Trigger: Before Record Load

    Event Types: Edit

    Condition: Sales Order:Pending Fulfillment

    State 1:

    Actions: Lock Record

    Condition: User Role xxx

    What can you see that I am doing wrong? I tried combining these two stages together but that did not work either.

    Thanks,

    Jason
    This is a cached copy. Click here to see the original post.

  • #9850

    al3xicon

    Looks like you want your definition to be “On Create” AND “On Update” (On Update is what is used when editing an existing transaction).


    Jason Kaulback replied on 08/23/2016, 07:08 AM: I edited the definition, but the workflow still isn’t working.

  • #9851

    al3xicon

    I notice that the workflow is in Testing mode – I assume you’re testing it out while logged in as whatever role you have set as the condition? It will only work for you if it is in Testing mode, so other users would not be able to test.

    Beyond that, I’d need to see some screenshots of the workflow and action definitions, if you can include those – particularly the conditions you’ve set up.

  • #9852

    Jason Kaulback

    Thanks for the help, I appreciate it. Here’s what I have:

  • #9853

    Jason Kaulback

    Here is State 1:

  • #9854

    al3xicon

    Instead of “Sales Order : Status”, try just “Status” (don’t select anything in the “record” column) in your conditions (you’ll need to do this in both your workflow AND action definitions). The idea here is that you are already on the Sales Order record, so you don’t need to “join” to another record to access it. The join you’re performing here by selecting “sales order” in the record dropdown is probably meant for a different record/transaction type that would normally have to join to get to the sales order data.

    Also, technically you don’t need the conditions in both places – you can just put them in the workflow definition if you like. I typically just put mine in the action definition.

    Hope this helps, let us know.

  • #9855

    Jason Kaulback

    I made the changes:

  • #9856

    Jason Kaulback

    Here’s the next step:


    Jason Kaulback replied on 08/23/2016, 08:20 AM: Still doesn’t seem to be working. I’m using the Administrator role and also have access to the role that I am restricting.

  • #9857

    al3xicon

    I have to admit, I’m not sure what else could be going on. At this point I’d try removing things just to see if I could get it working (however improperly), to identify where the issue might lie.

    The first thing I might try is changing the status from “Testing” to “Released”, if that won’t mess things up too bad for your users.

    Not that I think it matters, but I notice you have a custom workflow field in there – is that doing anything?

  • #9858

    Voltron

    Jason, you said you’re using the Administrator role. Have you actually tested while using the Swyft_Sales Administrator role? According to your condition, this shouldn’t lock while using the Administrator role.

    Also, turn on logging and see what it turns up.


    Jason Kaulback replied on 08/23/2016, 12:08 PM: I have both Administrator and Sales Administrator roles on my login. I created the workflow in Administrator, then switched my role to Sales Administrator to test. I cleared the cache and logged out, in case that was the issue. I turned on logging but haven’t seen that it is working/recording anything. I thought it may only apply to new records, so created a new SO, but that didn’t work either.

  • #9859

    MarthaHakes

    Jason, we have this workflow in place and have used for a couple of years. Here is our set-up Description If a SO has been billed, lock SO from being edited Inactive No Release Status Released Initiation Event Based

    Events

    On View Or Update

    Trigger Type

    Before Record Load

    Stage 1:

    Condition:

    Status = Sales Order:Billed,Sales Order:Pending Billing/Partially Fulfilled,Sales Order:Pending Billing,Sales Order:Partially Fulfilled And User Role != TSA Accounting – A/R,Administrator,TSA Operations Assistant

    This setup ONLY allows the roles I have listed to edit the SO if it is in any of the defined stages.I do not have anything listed in Event Type because I have a trigger type set. Try removing that. Hope it helps!

  • #9860

    Jason Kaulback

    That worked – thanks for the help everyone, I really appreciate it!

    Jason

You must be logged in to reply to this topic.