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" 
<messaging:plainTextEmailBody >

Volunteer is still needed for a future shift. 

Please click below to see the shift.


When I try to save it, it gives error like Error:

Unknown property 'String.Id'

  • Have you tried using just {!relatedTo}? – battery.cord Jun 14 '16 at 13:57

Can you try {!relatedTo.ID} instead of {!relatedToType.Id}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.