+ Start a Discussion
@GM@GM 

Unable to display the picklist value in Visualforce Template

In the below code the value of {!relatedTo.PRM_EOL_Reason__c} this field(which is picklist) is not coming in the vf email template

Could you please help that how to display this in the email template?

<messaging:emailTemplate subject="Notification for EOL" recipientType="User" relatedToType="Lead">
<messaging:htmlEmailBody >
    <html>
        <body>
            <p><b>Dear {!relatedTo.Assigned_ESR__r.Name} and {!relatedTo.Assigned_CAM__r.Name},</b><br/>

             The following partner accepted lead has been EOL’d with reason code: {!relatedTo.PRM_EOL_Reason__c}
         
             <br/>
            Please contact the partner user if you need additional info as to why this lead was EOL’d (End of Lifed).</p>
            <br/>
              
            <p><b>Lead Information:</b><br/>
            Lead Number: {!relatedTo.PRM_Lead_Number__c}<br/>
            Lead Assigned Date:&nbsp;  <apex:outputText value="{0,date,MMM dd','yyyy}">
            <apex:param value="{!relatedTo.Partner_Assigned_Date__c}" /></apex:outputText><br/>
           
            
            
            <p>Regards</p>
            
            <p>Admin</p>
           

        </body>
    </html>
 
</messaging:htmlEmailBody>

</messaging:emailTemplate>
Best Answer chosen by @GM
@GM@GM
That field was hidden for all profile including system admin... hence i was unable to show the value in vf page
 

All Answers

Shaijan ThomasShaijan Thomas
Can you check recordtype assignment if you have
Check if there is any dependancy for that picklist.
Shaijan 
Waqar Hussain SFWaqar Hussain SF
Try this code.
<messaging:emailTemplate subject="Notification for EOL" recipientType="User" relatedToType="Lead">
<messaging:htmlEmailBody >
    <html>
        <body>
            <p><b>Dear {!relatedTo.Assigned_ESR__r.Name} and {!relatedTo.Assigned_CAM__r.Name},</b><br/>

             The following partner accepted lead has been EOL’d with reason code: 
		<apex:selectList  size="1">
			 <apex:selectOption  Value="{!relatedTo.Assigned_CAM__r.Name}"></apex:selectOption>
		</apex:selectList>
         
             <br/>
            Please contact the partner user if you need additional info as to why this lead was EOL’d (End of Lifed).</p>
            <br/>
              
            <p><b>Lead Information:</b><br/>
            Lead Number: {!relatedTo.PRM_Lead_Number__c}<br/>
            Lead Assigned Date:&nbsp;  <apex:outputText value="{0,date,MMM dd','yyyy}">
            <apex:param value="{!relatedTo.Partner_Assigned_Date__c}" /></apex:outputText><br/>
           
            
            
            <p>Regards</p>
            
            <p>Admin</p>
           

        </body>
    </html>
 
</messaging:htmlEmailBody>

</messaging:emailTemplate>

 
@GM@GM
That field was hidden for all profile including system admin... hence i was unable to show the value in vf page
 
This was selected as the best answer