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
msmithey13msmithey13 

How can I get an email template... contact first name ....the email is triggered from the account?

I am triggering an email alert from the account when a checkbox goes true.  I want to personalize the email with a personal greeting using the contact name associated with the account but all tests have come back blank.  It appears that the template cannot pick up the field since it is not being triggered from the contact.  I want to continue with the account field trigger for future expansion purposes.  Any ideas how to accomplish this?

Best Answer chosen by Admin (Salesforce Developers) 
msmithey13msmithey13

I went ahead and just used the contact lookup field.  The user can then decide which contact the email can go to.  I will approach the automation if it becomes necessary.

Thanks for the input.  Much appreciated!

All Answers

MikeGillMikeGill

What about creating a primary contact field (lookup field) on the Account object ?

msmithey13msmithey13
That would be an idea I had not thought of. Can that be an auto fill?

Mark Smithey
Salesforce.com administrator
msmithey@Crocs.com
Skype: mark.smithey90
(303) 848-7682

[cid:image001.png@01CE9A5B.7B657070]
MikeGillMikeGill
It could be. You thinking when you set Account Role > Primary Contact or
flag on the related Contact?

Yes

--


*Mike Gill** *
Mobile: (0)7841 571-384

Skype: mikegill74

[image: Facebook] [image:
Twitter] [image:
LinkedIn] [image: Google
Plus]
msmithey13msmithey13
Good question. I would need to understand how the two options differ. Seems that if we used the Account Role>Primary Contact the user would be locked in there unless they went in and changed roles. If we did related contact, couldn't they just change out the name from the lookup as needed?

Mark Smithey
Salesforce.com administrator
msmithey@Crocs.com
Skype: mark.smithey90
(303) 848-7682

[cid:image001.png@01CE9A5C.F7C98150]
MikeGillMikeGill

Options

 

1. New field on Account called Primary Contact - Account owner / user enters the contact manually

 

2. Same as above - but you use Apex to fetch the relevant contact from related Contacts or Account Roles

 

3. Move to triggering from the Contact record - why do you need to stay at the Account level, can't you access everything from the Contact level?

msmithey13msmithey13
Thanks.


1. Easy enough.

2. I don't know Apex so would require an assist.

3. That was the request for future use by other profiles.

Mark Smithey
Salesforce.com administrator
msmithey@Crocs.com
Skype: mark.smithey90
(303) 848-7682

[cid:image001.png@01CE9A5E.A7322DD0]
msmithey13msmithey13

I went ahead and just used the contact lookup field.  The user can then decide which contact the email can go to.  I will approach the automation if it becomes necessary.

Thanks for the input.  Much appreciated!

This was selected as the best answer