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
kminevkminev 

Expose custom object field on email template

Hi,

I have a custom object which in turn has an Account field containing the account name.

I need to attach field from my custom object on an email template when comment is created to a case.

Here is what I have so far, but not functional:

Case: {!Case.CaseNumber}
Case Subject: {!Case.Subject}

New Case Comment:
{!Case.Last_Case_Comment}

For more information on this case, please visit the customer portal.
 
Customer Code: {!Account.Customer_Portal_Code__c}


Example Field to be displayed on email template: customObjec,field for this account name that is the owner of the case.

I hope I didn't make it confusing.

Thank you.


EPSWDEVEPSWDEV
It seems like you are trying to reference a lookup object.

you code should read something like

{!CustomObject__c.Account}

This will either give you the value you are looking for or record id of the Account data object. if you get the record id you can get the other details you need by simply querying the Account object -- select name from Account where recordId = ?

Hope this helps
kminevkminev
Thanks guys