Requirement
Client needs to restrict Sales role from choosing certain values from an item line field in Sales order.
Solution
We can resolve this issue by implementing a workflow solution. Here are the steps to create the workflow:
- Set the record type of the workflow as “Transaction” and select “Sales order.”
- Configure the trigger of the workflow to be “All.”
- Choose the desired state and click on “New action” to select “Return user error.”
- Set the trigger of the workflow action as “After field edit.”
- Select the sublist (this allows you to choose fields from the line level).
- Choose the “Items” sublist since the field that needs to be restricted is at the item line level.
- Select the specific field that needs to be restricted.
- Write the condition for the workflow. For example: Line: Field name = Field values to be restricted AND User Role = Roles to be restricted.
- Specify the text that should appear in the text box when the restricted role selects a value from the field in the Sales order.
- Click submit.