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
justzisguyuknowjustzisguyuknow 

Trying to create a custom button for email automation - is this even possible?

I'm not sure if the button I have in mind is even doable in Professional edition (or at all), but here goes:

 

I want a button on the Lead object that:

1. looks at the Lead Source field

2. Sends an email from an existing template (which template is based on the value of the Lead Source field)

3. Changes the value of the Lead Status field (same change regardless of Lead Source)

 

If a single button can't do all this at once, can it at least be set up to just send the email?

 

 

Jeff MayJeff May

In Enterprise, you can do this with custom button that calls a Webservice method in an Apex class to do that kind of processing.

DataRecoveryNederlandDataRecoveryNederland

not sure what your trying to do excacly but what i understand is that you want a button that goes to a template acording to the status of a lead/case.

 

i got a button myself that checks a field for the template id. 

template_id={!Case.X11_Factuur_knop__c}

 

and that field is just a case statement.

CASE(status__c
"status1", "00XD00000024Y89", 

"status2", "00XD00000024a70", 
null)

 

this way the email template changes acording to the status you are in.