You need to sign in to do that
Don't have an account?
Abhishek Singh 116
Unable to fetch the merge field in VisualForce Email Template
I am using a Visualforce email Template. I am unable to fetch merge fields. Below is the code:
<messaging:emailTemplate subject="Volunteer still needed for a shift" recipientType="User" relatedToType="GW_Volunteers__Volunteer_Shift__c">
<messaging:plainTextEmailBody >
Volunteer is still needed for a future shift. Please click below to see the shift.
https://cs18.salesforce.com/{!relatedToType.Id}
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
When I try to save it, it gives error like
Error:Unknown property 'String.Id'
<messaging:emailTemplate subject="Volunteer still needed for a shift" recipientType="User" relatedToType="GW_Volunteers__Volunteer_Shift__c">
<messaging:plainTextEmailBody >
Volunteer is still needed for a future shift. Please click below to see the shift.
https://cs18.salesforce.com/{!relatedToType.Id}
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
When I try to save it, it gives error like
Error:Unknown property 'String.Id'
For the link to your custom object, the syntax should be:
https://cs18.salesforce.com/{!relatedTo.Id}
That should fix it!
Deb