0

we'd like to display only specific Opportunity Products on an email template if a certain field is TRUE. We keep getting an error that says "value of attribute rendered associated with an element type apex:outputtext must not contain < character."

We are NOT super experienced with Visualforce so please be kind!

Current template has the following thus far:

<messaging:emailTemplate subject="New Buyer Opportunity Closed Won: {!relatedTo.Name}" recipientType="User" relatedToType="Opportunity">
<messaging:plainTextEmailBody >
{!relatedTo.Owner.name} is pleased to report that {!relatedTo.Name} for {!relatedTo.Account.name} has moved to the closed won stage.  Nicely done.
The revenue for this project is ${!relatedTo.Amount_this_Year__c} which is the projected amount based on conversations in the closing stages. This amount may also include the use of multiple services. See below:

<apex:repeat value="{!relatedTo.OpportunityLineItems}" var="line">
<apex:outputText rendered="{!NOT(ISBLANK(PS_Product_That_Requires_Project_Code__c))"></apex:outputText>
{!line.Name}
</apex:repeat>

The following event must now take place:
1) Link the fully executed (signed by all parties) final MSA and SOW to the Opportunity in Salesforce, specifically in the Google Docs, Notes and Attachments section.
Congratulations again.  Widen is pleased to welcome {!relatedTo.Account.name} to the customer family consisting of the most powerful brands in the world.

</messaging:plainTextEmailBody>
</messaging:emailTemplate>

1 Answer 1

0

Welcome to Salesforce Stack Exchange (SFSE)!

It appears that on this line...

<apex:outputText rendered="{!NOT(ISBLANK(PS_Product_That_Requires_Project_Code__c))"></apex:outputText>

...you are missing your closing curly brace: }


Try:

<apex:outputText rendered="{!NOT(ISBLANK(PS_Product_That_Requires_Project_Code__c))}"></apex:outputText>
1
  • Thanks! That helped us clear out the error but now we have a new error: Invalid field OpportunityLineItems__r for S Object Opportunity
    – Lori Rott
    Apr 14, 2022 at 20:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .