Hands on 3 - using a Quick action to add a record to a Chatter group

Quick actions can be object-specific or global actions. To use a quick action from Process Builder, the action must exist in your organization. If your organization is using quick actions that allow your users to create and update records easily, you can also use these actions in Process Builder. When you use these quick actions in Process Builder, you are only allowed to set values for fields that are part of the action's layout. Now we will create a process to fulfill the preceding business scenario and use our custom label:

  1. In Lightning Experience, navigate to Setup (Gear Icon) | Setup | PLATFORM TOOLS| Feature Settings | Chatter | Chatter Settings and make sure that the Allow Records in Groups checkbox is selected.
    1. To create a process, navigate to Setup (Gear Icon) | Setup | PLATFORM TOOLS | Process Automation | Process Builder, click on the New button, and enter the following details:
    • Name: Enter the name of the process. Enter Add campaign to Sales Executive group in Name.
    • API Name: This will be autopopulated based on the name.
    • Description: Write some meaningful text so that other developers or administrators can easily understand why this process was created.
    • This process starts when: Configure the process to start when a record is created or edited. In this case, select A record changes.
    1. Once you are done, click on the Save button.
      1. After Define Process Properties, the next task is to select the object on which you want to create a process and define the evaluation criteria. For this, click on the Add Object node. This will open an additional window on the right-hand side of the process canvas screen, where you have to enter the following details:
      • Object: Start typing and then select the Campaign object.
      • Start the process: For Start the process, select when a record is created or edited. This means that the process will fire whenever a record gets created or edited.
      • Recursion - Allow process to evaluate a record multiple times in a single transaction?: Select this checkbox only when you want process to evaluate the same record up to five times in a single transaction. In this case, leave this box unchecked.

      The additional window will look like what is shown in the following screenshot:

      1. Once you are done, click on the Save button.
        1. After defining the evaluation criteria, the next step is to add the process criteria. Once the process criteria are true, only then will the process execute the associated actions. To define the process criteria, click on the Add Criteria node. It will open an additional window on the right-hand side of the process canvas screen, where you have to enter the following details:
        • Criteria Name: Enter a name for the criteria node. Enter Only for active campaigns as the criteria name.
        • Criteria for Executing Actions: Select the type of criteria you want to define.  You can select either Formula evaluates to true or Conditions are met (a filter to define the process criteria) or No criteria-just execute the actions!. In this case, select Conditions are met. 
        • Set Conditions: This field lets you specify which combination of the filter conditions must be true for the process to execute the associated actions. Set [Campaign].IsActive to True.
        • Conditions: In the Conditions section, select All of the conditions are met (AND). This field lets you specify which combination of the filter conditions must be true for the process to execute the associated actions.
        • Under Advanced, select Yes to execute the actions only when specified changes are made.

        It will look like what is shown in the following screenshot:

        1. Once you are done, click on the Save button.
          1. Once you are done with the process criteria node, the next step is to add an immediate action to add a campaign to the Sales Executive Chatter group. For this, we will use the Quick Actions action available in Process Builder. Click on the Add Action available under IMMEDIATE ACTIONS; it will open an additional window on the right-hand side of the process canvas screen, where you have to enter the following details:
          • Action Type: Select the type of action; in this case, select Quick Actions.
          • Action Name: Enter a name for this action. Enter Add record to Chatter group as the action name.
          • Filter Search By: It allows you to specify the kind of action you want to execute. In this case, select Type and then for Type; select Create a Record; and for Action, select NewGroupRecord.
          • Set Quick Action Field Values: Use this to set values for the action’s fields.  For the current use case, to map the Related Record ID field, select the formula, and then select System Variable. It will open a popup, from where you can select the Custom Label that you have created.

          Likewise, map the Record ID field to [Campaign].Id.

          It will look like what is shown in the following screenshot:

          1. Once you are done, click on the Save button.
            1. The final step is to activate it. To activate a process, click on the Activate button on the button bar. Finally, the process will appear, as shown in this screenshot:

            Now, if a campaign gets created or updated with the Active status, the record will be added to the Sales Executive Chatter group by this process, as shown in the following screenshot:

            Likewise, you can create another process to add new users to a Chatter group.

            ..................Content has been hidden....................

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