You need to sign in to do that
Don't have an account?
Problem in feching data from User in Visual Force Email template?
Hi all,
I am creating Visualforce email template to add Signature, whenever user send mail other people.
1.In that template i have to fetch uer data like NAME, DIVISION... .
2.So I created fields in User object and trying to fetch data from user object.
3.when Use send test and verify merge fields showing data,But when we send mail from contact it is fetch data from user .
4. And logo also not displaying.
Here is my code:
<messaging:emailTemplate subject="Regarding Student" recipientType="Lead" relatedToType="user">
<messaging:plainTextEmailBody >
{!RelatedTo.FirstName} {!RelatedTo.LastName}
_____________________________________________
Continental
Division {!RelatedTo.Division__c}
Segment {!RelatedTo.Segment__c}
Rechnungsanschrift/Billing address {!RelatedTo.Billing_Address__c}
Mobile {!RelatedTo.MobilePhone}
Email {!RelatedTo.Email}
Visit us @ {!RelatedTo.URL__c}
______________________________________________
http://www.continental-corporation.com
<img src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest"
width="200" height="200"/>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
Privew:
Guru
_____________________________________________
Continental
Division
Segment IT
Rechnungsanschrift/Billing address Jeevan Bhema Nagar
Mobile (
Email vguru.com
Visit us @ www. guru.com
______________________________________________
http://www.continental-corporation.com
<img height="200" src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest" width="200" />
I am creating Visualforce email template to add Signature, whenever user send mail other people.
1.In that template i have to fetch uer data like NAME, DIVISION... .
2.So I created fields in User object and trying to fetch data from user object.
3.when Use send test and verify merge fields showing data,But when we send mail from contact it is fetch data from user .
4. And logo also not displaying.
Here is my code:
<messaging:emailTemplate subject="Regarding Student" recipientType="Lead" relatedToType="user">
<messaging:plainTextEmailBody >
{!RelatedTo.FirstName} {!RelatedTo.LastName}
_____________________________________________
Continental
Division {!RelatedTo.Division__c}
Segment {!RelatedTo.Segment__c}
Rechnungsanschrift/Billing address {!RelatedTo.Billing_Address__c}
Mobile {!RelatedTo.MobilePhone}
Email {!RelatedTo.Email}
Visit us @ {!RelatedTo.URL__c}
______________________________________________
http://www.continental-corporation.com
<img src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest"
width="200" height="200"/>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
Privew:
Guru
_____________________________________________
Continental
Division
Segment IT
Rechnungsanschrift/Billing address Jeevan Bhema Nagar
Mobile (
Email vguru.com
Visit us @ www. guru.com
______________________________________________
http://www.continental-corporation.com
<img height="200" src="https://testguru--test1--c.cs50.visual.force.com/resource/1509087818000/Contitechtest" width="200" />
https://na2.ap4.content.force.com/servlet/servlet.FileDownload?file=0156F00000DNU6E
In developer console I am able fetch data.