You need to sign in to do that
Don't have an account?

What parameter name is the related ID for an email?
I have a component that I call from an email template, the controller for the component is an Apex class that needs to get the ID of the related object so it can look up some data, in the constructor I do this:
public void ShippingHelper() {
this.quoteId = ApexPages.currentPage().getParameters().get('related_to_id');
}
When testing the email on the "Visualforce Email Template" page I can select the related object & it renders the email perfectly.
When I send the same email as part of an approval process none of the content from the class is rendered.
public void ShippingHelper() {
this.quoteId = ApexPages.currentPage().getParameters().get('related_to_id');
}
When testing the email on the "Visualforce Email Template" page I can select the related object & it renders the email perfectly.
When I send the same email as part of an approval process none of the content from the class is rendered.
Cross Object Merge Fields in Email Template is not yet available - vote for the idea below,
https://success.salesforce.com/ideaview?id=08730000000Brk7AAC
In API - you have to call the related object record like this,
{!CurrentObject__r.RelatedObject__c.FieldName__c}
Regards,
Ashish