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
AmbigaRamAmbigaRam 

Trigger for sending email when the case is closed

Hi,

 

I want to write the trigger which send the email notifications when the case is closed.

 

Can any one help for this?

 

 

Regards.,

R.Ambiga

Best Answer chosen by Admin (Salesforce Developers) 
vbsvbs
You are better off configuring a workflow email alert rather than code as the request seems easily configurable. Add a workflow to trigger when the case status is closed.

All Answers

vbsvbs
You are better off configuring a workflow email alert rather than code as the request seems easily configurable. Add a workflow to trigger when the case status is closed.
This was selected as the best answer
AmbigaRamAmbigaRam

Hi vbs,

 

Thanks for your reply,

 

I tried in assignment rules,but It does n't send email when the critreria is meet.

 

Will you please tell me another way to achieve.

 

Regards,

Ambiga

vbsvbs
Please re-read my post. I have not mentioned assignment rules anywhere but workflow rules. Here is how I would do it:
1. Create a workflow rule with criteria on Status field = Closed
2. Create an email alert action associated with this rule to send email to any recipient required as per your use case.
AmbigaRamAmbigaRam

Hi,

 

Thanks vbs,

 

It works.

 

Thanks a lot.

 

Is it possible to send the mail via trigger when the case is closed?

 

Regards.,

Ambiga