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
Andrée-Anne CouillardAndrée-Anne Couillard 

Territory Management field into VF email

Hi,

I have an e-mail template made from VF (which I'm not familiar with).
Email is calling out a few field in Account and OP, and I wnat to add the Territory (we use Territory management)
- Territory shows under Account and as a look-up field under OP.

Example of working piece of code:
<br/>Account Name: <b><a href="https://na13.salesforce.com/{!relatedTo.Account.Id}">{!relatedTo.Account.name}</a></b>

Not working:
 <br/>OP Territory: <b><a href="https://na13.salesforce.com/{!relatedTo.Account.Id}">{!relatedTo.Territory}</a></b>

I guess it is not working because it is not a normal field... but how could I call it out?
I tried to call it from the OP too, but not better.

The error I get is: Error: Invalid field Territory for SObject Opportunity

Thanks!