You need to sign in to do that
Don't have an account?
Nichelle Hubley
Visualforce email template render name of related object, not the id
Hi,
This is definitely a beginner level question, but I can't find the answer.
In my email I want to display the name of an account, not the ID.
The catch is that the vf email template references a custom object's related object that is AN account (the agency account), but not THE account the the object belongs to.
Other solutions I found say to use Account.Name but that doesn't work in this case because it isn't the record's account I'm referencing.
The visualforce code I'm using is: {!relatedTo.Agency2__c}
I hope that question makes some sense. I'd be grateful for any help you can offer.
Nichelle
This is definitely a beginner level question, but I can't find the answer.
In my email I want to display the name of an account, not the ID.
The catch is that the vf email template references a custom object's related object that is AN account (the agency account), but not THE account the the object belongs to.
Other solutions I found say to use Account.Name but that doesn't work in this case because it isn't the record's account I'm referencing.
The visualforce code I'm using is: {!relatedTo.Agency2__c}
I hope that question makes some sense. I'd be grateful for any help you can offer.
Nichelle
Hi Nichelle,
Is it a lookup field? If so would something like {!Object.LookupObject__r.name} work?
If not can you post some code please?
Thanks,
Al
All Answers
Hi Nichelle,
Is it a lookup field? If so would something like {!Object.LookupObject__r.name} work?
If not can you post some code please?
Thanks,
Al