This topic contains 11 replies, has 0 voices, and was last updated by Jason Kaulback 8 years, 2 months ago.
-
AuthorPosts
-
August 23, 2016 at 6:56 am #9849
Jason KaulbackHello,
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. -
August 23, 2016 at 6:58 am #9850
al3xiconLooks 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.
-
August 23, 2016 at 7:16 am #9851
al3xiconI 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.
-
August 23, 2016 at 7:35 am #9852
Jason KaulbackThanks for the help, I appreciate it. Here’s what I have:
-
August 23, 2016 at 7:40 am #9853
Jason KaulbackHere is State 1:
-
August 23, 2016 at 7:49 am #9854
al3xiconInstead 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.
-
August 23, 2016 at 8:16 am #9855
Jason KaulbackI made the changes:
-
August 23, 2016 at 8:16 am #9856
Jason KaulbackHere’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.
-
August 23, 2016 at 8:37 am #9857
al3xiconI 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?
-
August 23, 2016 at 10:26 am #9858
VoltronJason, 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.
-
August 23, 2016 at 10:52 am #9859
MarthaHakesJason, 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!
-
August 23, 2016 at 2:20 pm #9860
Jason KaulbackThat worked – thanks for the help everyone, I really appreciate it!
Jason
-
AuthorPosts
You must be logged in to reply to this topic.