You need to sign in to do that
Don't have an account?
Custom Email button to select template based on user
Right now I have a custom email button that calls and specific email template. Is there any way to use the same button but call a different template from either a a custom object on the users record?
Baiscally if User's showroom = this, then template = this
This is the code for the custom email button I currently have:
https://cs3.salesforce.com/_ui/core/email/author/EmailAuthor?
&p3_lkid={!Opportunity.Id}
&p3={!Opportunity.Name}
&rtype=003
&
IF(AND({!ISPICKVAL( $User.Showroom__c , "Houston")}) , template_id = 00X30000001ARUA),
IF(AND({!ISPICKVAL( $User.Showroom__c , "Lake Forest")}), template_id = 00X30000001AGI9),
&p26={!$User.Email}
&p24={!Opportunity.Renters_Email__c}
&retURL=/{!Opportunity.Id}
&saveURL=/{!Opportunity.Id}
I used a Case statment to call the template. Got a some help from
(https://sites.secure.force.com/success/profile?u=00530000003TQ7zAAG)
&template_id={!CASE(User.Showroom__c ,
'Lake Forest','00X30000001AGI9',
'Houston','00X30000001AGWW',
'00X30000001A3Or')}
All Answers
Give this a shot, will require some tweaking, but should get you started:
Ignore that first line of comments, that was my original code, intended to remove that...
Thank you. I'll give it a shot and let you know how it turns out. Thanks again!
I used a Case statment to call the template. Got a some help from
(https://sites.secure.force.com/success/profile?u=00530000003TQ7zAAG)
&template_id={!CASE(User.Showroom__c ,
'Lake Forest','00X30000001AGI9',
'Houston','00X30000001AGWW',
'00X30000001A3Or')}