You need to sign in to do that
Don't have an account?
AntonyasLen
<apex:repeat> issue
Hi everybody,
My opportunity has a master-detail to a custom object called Opportunity.
i tried this
<apex:repeat value="{!Opportunity.Payment__c}" var="line"
but it's not working.
Anyone?
All Answers
Repeat tag always work with collection and iterate the value and show according to the requirement:
<apex:repeat value="{!Account}" var="var1">
{!var1.Name}
</apex:repeat>
// You can see the Name vlaue of all available Account in the organization.
So we can't use record relation??
I already did in an other visual force page with the repeat tage on the OpportunityLineItem so far it was it's working.
So i was thinking that i can do the same on the payment object with the Opportunity.
Instead of providing the API name of your custom object , you need to provide the relationship name that you have provided and also it should end with __r .
I tried it to :
<apex:repeat value="{!Opportunity.Payment__r}" var="line">
........
</apex:repeat>
but i got the error below:
Save error: Invalid field Payment__r for SObject Opportunity
and the API Name isPayment__c
how stupid am i ....THANKS
Hi,
i'am having the same issue and just can't figure it out.
i only want to repeat a field of each opportunities on a visualforcepage.
The custom field(rich text) is menus__c.
and my visualforce code is the follwing ;
<apex:repeat value="{!Opportunity.menus__c}" var="Line">
<tr>
<td>{!Line.menus__c}</td>
</tr>
</apex:repeat>
i have also tried :
<apex:repeat value="{!Opportunity.menus__r}" var="Line">
<tr>
<td>{!Line.menus__r}</td>
</tr>
</apex:repeat>
But i must be missing something....
Would you have any idea?
Thank you in advance.
Jonathan