function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hm_inviHm_invi 

Implement a button on case object to send an Email listing the case details.

I have to be able to send an Email to a user X when there is a button clicked on the Case object.
This Email should contain the case details.
How do i implement this?
-I will create an Email Alert and an Email Template. 
But how can i link the button to this Email. 
Does this button needs to be implemented as Aura component or using a Button Action?

(There was also another easier approach which involved checkbox or picklist and a PB or Workflow. But it was ruled out for some reason. So stuck with the button implementation)

Thanks for your time to respond!!!!
PradeepgorePradeepgore

Hi Hm_invi,

1. Create a vf page/ aura/ lwc depending on what's suitable for the ask
2. Create an action/ button from Setup > object manager > Case
3. Associated action/ button to the components mentioned in 1
4. In page/aura/lwc, display confirmation message window  before sending the mail(Save and Cancel button should be added on popup modal)
5. In page/aura/lwc, when the mail is sent, display success toast else display error message to specify user is inactive or any other error details

For sending an email, you can use links below
https://developer.salesforce.com/forums/?id=9062I000000Xs9GQAS
https://developer.salesforce.com/forums/?id=9062I000000XpPVQA0

Mark this as best answer if this satisfies your query

Additionally we can connect on pradeep.gore3@gmail.com

#DeepDivesIntoSalesforce



Pradeep Gore