Nutrex client want to prevent sales people to access or edit Sales Orders with status Pending Fulfillment via workflow.
Solution
The workflow below uses the Lock Record action to lock the record from salespeople users.
- Create the workflow
- Navigate to Customization > Workflow > Workflows > New
- Set the following field values:
- Name: <Any>
- Record Type: Select Transaction
- Sub-Types: Select Sales Order
- Execute As Admin: Enter Checkmark
- Release Status: Select Testing / Released
- Enable Logging: Enter Checkmark
- Event-Based: Enter Checkmark
- On View/Update: Enter Checkmark
- Trigger Type: Select Before Record Load
- Create the workflow action
- On the Workflow’s Workspace, Click State 1
- Under State subtab (on the right side of the page), click New Action
- Select Lock Record
- Set the following field values:
- Trigger On: Before Record Load
- Condition (Click the icon beside the condition field to open the Condition Builder)
- Field: Select User Role
- Compare Type: Select Any of
- Selection: Sales rep
- Field: Select Status
- Compare Type: Select Any of
- Selection: Select Sales Order:Pending Fulfillment
- Click Save
- Click View to exit Edit mode