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
BarryPlumBarryPlum 

Trying to put a signature on a Visualforce Email template

This tag works: {!relatedTo.Owner.Name}
This tag does NOT work: {!relatedTo.Owner.Title}

I've also tried using {!User.Title} and {$User.Title}

Any suggestions on how to get to the rest of the Owner fields?
Thanks!
Barry
Best Answer chosen by Admin (Salesforce Developers) 
Alexis KasperaviciusAlexis Kasperavicius

Well, you could also just use:

 

{!$User.Title}

 

Note the addition of the '$' gives you access to what you may be used to using in mail templates if you're just getting started with VisualForce.

 

Of course, this is the sending user, not the record owner - but in a mailing situation that's what I would want.

 

 

 

 

All Answers

Sam.arjSam.arj
UserInfo object does not have getTitle Method. Owner refers to a User object however i do not think it would load all the properties of the user profile mostly just Id, name, Alias, etc.

Therefore, if you need the title information you should write couple of lines of code in your Visualforce Controller to query that information from the database.

Cheers



Alexis KasperaviciusAlexis Kasperavicius

Well, you could also just use:

 

{!$User.Title}

 

Note the addition of the '$' gives you access to what you may be used to using in mail templates if you're just getting started with VisualForce.

 

Of course, this is the sending user, not the record owner - but in a mailing situation that's what I would want.

 

 

 

 

This was selected as the best answer