Create workflow to restrict a specific item while creating the sales order.

Scenario: User needs to have a workflow that will restrict the items for a particular while preparing the sales order

Solution: Create a saved search to draw the list of items that needs to be restricted.

Customization> Workflow> Workflows> New

Enter the Name of workflow(Restrict item in sales order)
Record Type: Transaction
SubTypes: Sales Order
Description: Provide the description if any.
Check : Execute as Admin
Release Status: Released
Keep Instance and History: Always
Check: Enable Logging
Check: Event Based
Check: On create
Check: On view and update
Trigger Type : All
Saved Saerch condition: select the search with the listed item that needs to be restricted.
Click Save

Select the state:
Click New Action
Select Return User Error:
Tigger On: Select After Field Edit
Select : Contexts
Select Sublist: Items
Select Triggering Client Fileds: Name
Select Condition
Field: Role
Compare Type: Any of
Selection: Select Roles
Saved Search Condition: Add the search(transaction saved search) that list the specific items.
Text: Type the error message
Click Save

Select the state:
Click New Action
Select Return User Error:
Tigger On: Select Before Record Submit
Select : Contexts
Select Condition
Field: Role
Compare Type: Any of
Selection: Select Roles
Saved Search Condition: Add the search(transaction saved search) that list the specific items.
Text: Type the error message
Cilck Save

Note:
The error message will be pop-up when the specific item is added to the sales order.
Also, the error message will pop-up when sales order is saved, and the sales order will not get saved.
If a Sales order with the specific item is edited, then cannot be saved.
(All the above scenarios are applicable when the user is the in that particular role mentioned in the condition of workflow)

Leave a comment

Your email address will not be published. Required fields are marked *