• Amanda Malmstrom
  • NEWBIE
  • -1 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hello, 

I have logic in an email that works perfectly on one custom object, but when repurposing that logic into another custom object's email it does not work.

This is my snipit that does not work:

<apex:repeat var="cb" value="{!relatedTo.Advance__r.CoBrand__c}">
<apex:outputPanel rendered="cb == 'BrandA'">
The BrandA Company
</apex:outputPanel>
<apex:outputPanel rendered="cb != 'BrandA'">
The BrandB Company
</apex:outputPanel>
</apex:repeat>


I checked and {!relatedTo.Advance__r.CoBrand__c} does populate on its own within the email body, but the apex statement does not render any text. I had to go with the == and != approach because CoBrand__c can have many values but the only time the statement needs to be different is for BrandA.

Is there something wrong with the syntax? 

 
Hello, 

I have logic in an email that works perfectly on one custom object, but when repurposing that logic into another custom object's email it does not work.

This is my snipit that does not work:

<apex:repeat var="cb" value="{!relatedTo.Advance__r.CoBrand__c}">
<apex:outputPanel rendered="cb == 'BrandA'">
The BrandA Company
</apex:outputPanel>
<apex:outputPanel rendered="cb != 'BrandA'">
The BrandB Company
</apex:outputPanel>
</apex:repeat>


I checked and {!relatedTo.Advance__r.CoBrand__c} does populate on its own within the email body, but the apex statement does not render any text. I had to go with the == and != approach because CoBrand__c can have many values but the only time the statement needs to be different is for BrandA.

Is there something wrong with the syntax?