<apex:repeat value="{!relatedTo.Apttus_Config2__AssetLineItems__r}" var="astitem">
                    <apex:outputPanel layout="none" rendered="{!IF(astItem.Apttus_Config2__EndDate__c != null && astItem.Apttus_Config2__EndDate__c == (TODAY()+60),true,false) && astItem.Apttus_Config2__AssetStatus__c == 'Activated'}">
                       <!--<apex:outputPanel layout="none" rendered="{!$Profile.Name =='VAR - Partner Community Login'}"> -->
                        <tr class="astLineItems" >
                            <td>{!astItem.Name} <a href="{!$SetUp.VAREmailFields__c.Partner_Comm_URL__c}">Click here to take action</a> </td>

Please help me/guide me gurus, to get the profile name of the contact of this custom object (Apttus_Config2__AssetLineItem__c) in "rendered" of this VF email template. I know that it is not possible to get the profile name of the contact without writing SOQL query, but is there any way to achieve it in VF Email Template?

I'm accessing this snippet of code (off of VF Email template) from batch job. My relatedTo object is Account to get Orders and Asset LineItems from this VF Email template. I know if I write a VF Component and Controller, I could get the profile name. Is there any way to get the 'profile name' of the 'contact' of this custom object - 'Asset Line Item' in my rendered in VF Email template.

Thanks in advance. Gopal

  • What do you mean by "contact profile"? Contacts do not have a profile. Do you mean the user profile of the record owner? Commented Jul 14, 2018 at 17:11
  • David, sorry for the confusion. User profile of the contact associated to this custom object (through a custom field - Primary contact). Not the profile of the record owner.
    – GOPAL Y
    Commented Jul 14, 2018 at 19:02
  • You will have to write a VF component and controller to do that query for your template. Commented Jul 14, 2018 at 20:07
  • Thank you David, I knew that I need to write a VF Component and Controller. I've tried to find if there is any other way to get it in VF email template. Thank you so much for confirming it.
    – GOPAL Y
    Commented Jul 15, 2018 at 20:34


You must log in to answer this question.

Browse other questions tagged .