There are scenarios where users need to check if there is a certain syntax in a field then display an error message pop-up to warn the user. To achieve this, we need to use the Return User Error workflow action with an applied Workflow Condition, contains.
In our sample scenario, when editing the record, a user needs to validate the email field in the Employee record if it contains the word test. To do this, we need the following Workflow setup:
- Create a Workflow by navigating to Customization > Workflow > Workflows > New
- Name: Enter the Name of the Workflow
- Record Type: Select Customer
- Execute as Admin: Enter checkmark
- Release Status: Select Testing (If the Workflow is feasible on your end, change the Release status to Released)
- Initiation:
- Select Events Based
- Event Definition:
- Select On Create
- Select On View or Update
- Click Save
- Click State 1
- Click New Action
- Click Return User Error
- Trigger On: After Field Edit
- Condition:
- Field: Select E-mail
- Compare Type: Select contains
- Value: Enter test
- Click Save
- Parameters:
- Text:
- Enter Error message
- Click Save
After following the Workflow setup above, the Workflow will display a pop-up message after editing the field E-mail if it contains the word test, in the Customer record.
Do you have any tips when using the Return User Error action? Share it in the Community! 😊