I would like members from the Opportunity Teams from Team Role 'Solutions Consultant' only, to be displayed on an HTML Visualforce email template.

I would like the code to have the same format as:

    <tr > 
    <td bgcolor="#00A6C3"><font color="#FFFFFF"><b><i>Lead Source:</i></b></font></td>
    <td>{!relatedTo.LeadSource}  </td> 
    <tr > 

  • You'll need to write a VF component with a controller to retrieve the opp team members – David Cheng Apr 19 '18 at 15:03
  • Could you please give me an example? – SerenaSher Apr 19 '18 at 16:18
  • Here are some good starting points: google.com/… – David Cheng Apr 19 '18 at 18:50

Assuming Opportunity is the "relatedTo" attribute, you can do this without a component or controller:

<apex:repeat value="{!relatedTo.OpportunityContactRoles}" var="oppConRole">
  <apex:outputText rendered="{!oppConRole.Role='Solutions Consultant'}">
| improve this answer | |

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.