Carry out the following steps to generate a default Opportunity close date using a field update workflow:
- 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 rule 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:
- Click on New Rule.
We will be presented with the Step 1: Select object page.
- Select Opportunity and click on Next, as shown in the following screenshot:
We will be presented with the Step 2: Configure Workflow Rule page.
- Enter Set Opportunity Close Date in the Rule Name field.
- Optionally, enter a description in the Description field.
- Select the created option from the Evaluation Criteria options list.
- In the Rule Criteria section, set the Run this rule if the following option to formula equates to true.
- Paste or enter the following formula in the formula editor:
NOT(IsClosed)
- 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 Set Opportunity Close Date in the Name field.
- Accept the default value in the Unique Name field, which is automatically set as Set_Opportunity_Close_Date.
- Optionally, enter a description in the Description field.
- Set the Field to Update to Opportunity.
- Select Close Date.
We will be presented with the Specify New Field Value section.
- Select the option Use a formula to set the new value.
- In the Show Formula Editor, paste or enter NOW() + 21.
- 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 re-directed 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: