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
cmctamcmctam 

email template fields won't display

hi i'm create an email template using fields from both my Contact object and a custome object. the custome object fields can be selected but no data appears in the email wherever i used them any ideas? thanks Tammy
Best Answer chosen by Admin (Salesforce Developers) 
shillyershillyer

You can, it depends how the relationship is set up.

 

If you create a lookup field on the Contact object that points to your Custom Object, you should be able to use Custom Object merge fields on your template. Just be sure that when you send the email, you select the Related To dropdown to your custom object and a specify a record. Then when you select the template, the values should appear.

 

Best,

Sati

All Answers

shillyershillyer

You should be able to do this with a Visualforce Email Template, you just need to set the relatedToType attribute to your custom object. An example can be found here.

 

Hope that helps,

Sati

 

 

cmctamcmctam

Hi

 

Thanks for replying

I didn't think i'd have to code for this.....especially since all of the objects and fields appear in the dropdowns for the email template??

Why can't I just use the fields from the dropdowns?

 

Tammy

shillyershillyer

You can, it depends how the relationship is set up.

 

If you create a lookup field on the Contact object that points to your Custom Object, you should be able to use Custom Object merge fields on your template. Just be sure that when you send the email, you select the Related To dropdown to your custom object and a specify a record. Then when you select the template, the values should appear.

 

Best,

Sati

This was selected as the best answer
cmctamcmctam
:) .....thanks...now that makes sense!