function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amit PamnaniAmit Pamnani 

approval request link in visualforce email template

Hi,

I have a created a VISUALFORCE Email Template and using the same email template in "Approver assignment email template" i.e in APPROVAL PROCESS.
I need a link to approval request in that email,so I have added "ApprovalRequest.Internal_URL" but getting an error as "
Error: Unknown property 'core.email.template.EmailTemplateComponentController.ApprovalRequest'".

If I am creating Text Email Template and using "ApprovalRequest.Internal_URL",then its working fine.but with VISUALFORCE Email Template its not working.

If anyone know how to use it,please share the steps.
Below is the VF code I am using




<messaging:emailTemplate subject="New Account: {!relatedTo.Name} -- Pending Approval" recipientType="User" relatedToType="Account">

<messaging:htmlEmailBody >
<html>
<body>

<P>Hi,</P>
<P>Please approve Account</P>

<apex:outputPanel rendered="{!relatedTo.recordType.name = 'StandardAccount'}">
<apex:outputLabel value="Account Name : " for="id1" /><apex:outputField value="{! relatedTo.Name }" id="id1"/><br/>
<apex:outputLabel value="Annual Revenue : " for="id2" /><apex:outputField value="{! relatedTo.AnnualRevenue }" id="id2"/><br/>
<apex:outputLabel value="Industry : " for="id3" /><apex:outputField value="{! relatedTo.Industry }" id="id3"/><br/>
<apex:outputLabel value="Status : " for="id4" /><apex:outputField value="{! relatedTo.Status__c }" id="id4"/><br/>
<apex:outputLabel value="User : " for="id5" /><apex:outputField value="{! relatedTo.User__c}" id="id5"/><br/>
</apex:outputPanel>

<apex:outputPanel rendered="{!relatedTo.recordType.name == 'AdvancedAccount'}">
<apex:outputLabel value="Account Name : " for="id6" /><apex:outputField value="{! relatedTo.Name }" id="id6"/><br/>
<apex:outputLabel value="Phone : " for="id7" /><apex:outputField value="{! relatedTo.Phone }" id="id7"/><br/>
<apex:outputLabel value="Rating : " for="id8" /><apex:outputField value="{! relatedTo.Rating }" id="id8"/><br/>
<apex:outputLabel value="Type : " for="id9" /><apex:outputField value="{! relatedTo.Type }" id="id9"/><br/>
<apex:outputLabel value="User : " for="id10" /><apex:outputField value="{! relatedTo.User__c }" id="id10"/><br/>
</apex:outputPanel>


<apex:outputLink value="{!ApprovalRequest.Internal_URL}">
Account Approval Link
</apex:outputLink>


</body>
</html>

</messaging:htmlEmailBody>

</messaging:emailTemplate>

 
Shashikant SharmaShashikant Sharma
Hi, 

Could you please share what is Internal_URL , is it field on Account ? 

Thanks
Shashikant
Amit PamnaniAmit Pamnani
Hi Shashikant,

Its a merge field on email template.