Carry out the following steps to set a default name when creating an opportunity using a field update workflow rule:
- Click on the Setup gear icon in the top right-hand corner of the main Home page, as shown in the following screenshot:
- Click on Setup, as shown in the following screenshot:
- Navigate to the workflow rules customization setup page as follows:
Process Automation | Workflow Rules. - Click on Continue (if shown).
- The Continue button is found on the Understanding Workflow page (if this appears), as shown in the following screenshot:
We will be presented with the Step 1: Select object page.
- Select Opportunity and click Next, as shown in the following screenshot:
We will be presented with the Step 2: Configure Workflow Rule page.
- Enter Set Opportunity Name in the Rule Name field.
- Optionally, enter a description in the Description field.
- Select the created, and every time it's edited option from the Evaluation Criteria options list.
- In the Rule Criteria section, set the Run this rule if the following option to formula evaluates to true.
- Enter the following formula in the formula editor:
NOT( CONTAINS( Name, Account.Name ) )
- Click on Save & Next, as shown in the following screenshot:
We will be presented with the Step 3: Specify Workflow Actions page.
- In the Immediate Workflow Actions section, set the Add Workflow Action option to New Field Update, as shown in the following screenshot:
We will be presented with the New Field Update page.
- Enter Opp Name Update in the Name field.
- Accept the default value in the Unique Name field, which is automatically set as Opp_Name_Update.
- Optionally, enter a description in the Description field.
- Set the Field to Update to Opportunity Name.
We will be presented with the Specify New Field Value section.
- Select the Use a formula to set the new value option.
- In the formula editor box, paste or enter the following formula:
Account.Name & " " & Name
- Click on Save, as shown in the following screenshot:
We will be presented with the Step 3: Specify Workflow Actions page.
- Click on Done, as shown in the following screenshot:
We will be redirected to the new Workflow Rule where we can activate the rule.
- Finally, click on Activate, as shown in the following screenshot:
If there is no default workflow user currently set, a user will need to be chosen and you will be alerted with a warning message, as shown in the following screenshot:
- Click on OK.
If there is no default workflow user currently set we will be re-directed to the Process Automation Settings page where we can set the Default Workflow User, as shown in the following screenshot:
- Set the Default Workflow User.
- Click on Save.
- We are finally re-directed to the Workflow Rule Detail page with the Active checkbox set, as shown in the following screenshot: