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
Emmanuel CoronaEmmanuel Corona 

Email template - Name instead ID

Greetings!

 

I have and vf email template for my custom object where i have a lookup field to search for the Opportunity... but when i test the template i get the ID opp instead the name... is there a way to fix it???

Best Answer chosen by Admin (Salesforce Developers) 
Avidev9Avidev9
How about doing something like
relatedTo.Opportunity__r.Name instead of relatedTo.Opportunity__c .

Change the api name according to your data model

All Answers

Avidev9Avidev9
How about doing something like
relatedTo.Opportunity__r.Name instead of relatedTo.Opportunity__c .

Change the api name according to your data model
This was selected as the best answer
Emmanuel CoronaEmmanuel Corona
Master! it works ;) thanks Avidev9