Wednesday, June 30, 2021

Trigger Email Notification to using Button from record page.

Sending Email Notification to using Quick Action Button and Workflow rule. 

Quick Action performs a specific action in Salesforce, such as creating or updating a record, sending email etc. In this use case we will see how to send email notification to a Reviewer (User) by using quick action and workflow rule. 


Use Case: 

When the user clicks on a button called “Notify Reviewer” it should send an email notification to the Reviewer and the status should be updated from “New” to “In Review” 


 


Steps involved in Creating a Quick action: 

  • Go to Setup Object Manager. 

  • Select the object. (For this example, Opportunity) 

  • Click Buttons, Links, and Actions. 

  • Click New Action. 


 

 

 

 

  • Select an Action Type as Update a Record. 

  • Enter a Label as “Notify Reviewer” This will appear in the form of a button on the object page.  

  • Enter a Success Message as shown in below screenshot 

  • Click Save. 

 

 


Create Checkbox in “Opportunity” object and need to add this check box to the quick action layout. Note: Based on Check box value (Checked or Unchecked) workflow will send email notification.  


 


Click on Edit Layout option as shown in Below screenshot to add/remove fields in Quick action layout. 


  

Add “Notify Reviewer” Check box in quick action layout. 

Click Save. 



Predefined Fields Values 

Click New from Predefined Fields Values section. 


 


For this example“Notify Reviewer” Checkbox predefined value need to set as “True” in formula box. So this checkbox value selected checked by default and user do not need to click on check box while sending notification. 

 

 


In below screenshot we can see that quick action button “Notify Reviewer” is added to layout. 


 


Creating Workflow rule for sending email notification: 

Create a workflow rule in Opportunity object as shown in below screenshot. 


 


Evaluation Criteria: Created, and every time its edited  

Condition: Notify Reviewer = True. 


 


Add workflow action as  

  • Email Alert: Create an email alert with email template and recipient. 

  • Field update: Create a field update to set the “Notify reviewer” as false And field update for status update. 

Activate workflow. 


 


As shown in below screenshot Status is set to “New” initially and Reviewer is also selected. Now User can click on Notify Reviewer quick action button to send email notification to reviewer. 


 


After clicking on Notify Reviewer button, a popup window is opened with by default Notify Reviewer checkbox selected. User can click on Save button to send notification. 


 


After sending email notification to reviewer, it will display a success message on screen as shown in below screenshot. 


 

Written By: Raghu

 

 

 

No comments:

Post a Comment

 New Visitor Log Entry flow with Community: Visitor Log