function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SYM12SYM12 

Error: Invalid field Opportunity_Rebate__r for SObject Opportunity

I am writing a simple VF template 

 

Getting an error while saving ( Error: Invalid field Opportunity_Rebate__r for SObject Opportunity)

 Opportunity_Rebate is a custom related list and Master Detail with the Opportunity

i have tried all the options(Opportunity_Rebate__c ,Opportunity_Rebates__c,Opportunity_Rebates__r,Opportunity_Rebate__r)

 

<messaging:emailTemplate subject="testing"
recipientType="Contact"
relatedToType="Opportunity"
subject="Rebates for opportunities: {!relatedTo.name}">

<messaging:plainTextEmailBody >
Dear {!recipient.name},
 
Below is a list of Opportunities Rebates related to Opportunity: {!relatedTo.name}

              [ Discount ] - [ Subject ] - [ Email ] - [ Status ]
<apex:repeat var="cx" value="{!relatedTo.Opportunity__Rebate__r}">
              [ {!cx.Discount__c} ]

</apex:repeat>

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

 

Any suggetions!!Do i need to add somting else

 

Thnaks