Adding an action to a process

Once you are done with the process criteria node, the next step is to add an immediate action to create a contract. For this, we will use the Create a Record action, available in Process Builder. You can add multiple immediate and scheduled actions for a particular criteria node. The only limitation is the maximum number of criteria nodes that you can add in one process, which is 200. Immediate actions are executed as soon as the evaluation criteria are met.

Scheduled actions are executed at a specified time. We will add an immediate action with the following steps:

  1. We need to add one immediate action to auto-create a record. For this, we will use the Create a Record action, available in Process Builder. Click on Add Action, available under IMMEDIATE ACTIONS, as shown in the following screenshot:

  1. Now, enter the following details:

    • Action Type: Select the type of action. In this case, select Create a Record.
    • Action Name: Enter Create Contract record in Action Name.
    • Record Type: Select the object that you want to create a record for. Start typing, and then select the Contract object.
    • Set Field Values: Certain fields are required when you create a record. When you select the object that you want to create a record for, Process Builder automatically displays the required fields for that record in each row. In this case, a row for Account ID and Status shows automatically. When setting a value for a given field or a field you have added, the available value types are filtered, based on the field that you have selected. The available value types are:
      • Currency: You can manually enter a currency value.
      • Boolean: This allows you to choose a true or false Boolean value.
      • DateTime or Date: You can manually enter a DateTime or Date value.
      • Formula: You can easily create a formula, using functions and fields.
      • Global Constant: This allows you to choose a global constant to set a value to null or an empty string. For example, choose $GlobalConstant.Null or $GlobalConstant.EmptyString
      • ID: You can manually enter a Salesforce ID.
      • MultiPicklist: This allows you to choose one or more multi-select picklist values.
      • Number: You can manually enter a number value.
      • Picklist: This allows you to choose a picklist value.
      • Reference: This allows you to choose a value, based on a field on the record or on a related record.
      • String: You can manually enter a string value.

To select the fields, you can use field picker. To enter the values, use the text entry field and map the fields according to the following screenshot:

Use the formula to set the Contract Start Date dynamically, based on the preceding requirement; in this case, you should use the account created date + 90 days. Use Function to select DATEVALUE (it returns a date value for a DateTime), use the Field picker to select the Created Date field, use Operator to select +, and then enter 90, as shown in the following screenshot:

The new record's Created By field is set to the user that started the process by creating or editing a record.

  1. Once you are done, click on the Save button to save the process's immediate action. The process will appear, as shown in the following screenshot:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.85.213