0

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'

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

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.