0

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:

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

</pre>
  • 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
1

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'}">
    <tr><td>{!oppConRole.Contact.Name}</td></tr>
  </apex:outputText>
</apex:repeat>

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.