You need to sign in to do that
Don't have an account?

Error: 'Quotes' is not a valid child relationship name for entity Opportunity
Hi, I am trying to add quote to my tabbed opportunity VF page, but got the error.
<apex:tab label="Quotes" name="Quotes" id="tabquote" rendered="{!$Profile.name='System Administrator'}" > <apex:relatedList subject="{!opportunity}" list="Quotes" /> </apex:tab>
But in the field definition, it shows Quotes.
Field Label Opportunity Name Field Name Opportunity Data Type Master-Detail(Opportunity) Child Relationship Name: Quotes
I tried to look for it in Apex explorer, but could not find it.
Anyone can help?
The API Version needs to be 18 or at least 17 (ideally version 18.0).
Edit your VF page, then click on the "Version Settings"sub tab. The default tab will be "Visualforce Markup" where you edit your code, but click on the other tab. There you can change the API version. Set it to 18 and then it will recognize the Quotes object. You'll need to do the same with any APEX code that references Quotes.
All Answers
Tried
quotes__r; quote__r
with same error.
I assume you've enabled quotes.
This is most likely an API version issue. Are you using eclipse or the app to write your VF page?
Yes, quotes are already enabled.
I am updating VF page in dev mode in browser.
The API Version needs to be 18 or at least 17 (ideally version 18.0).
Edit your VF page, then click on the "Version Settings"sub tab. The default tab will be "Visualforce Markup" where you edit your code, but click on the other tab. There you can change the API version. Set it to 18 and then it will recognize the Quotes object. You'll need to do the same with any APEX code that references Quotes.
Thanks, that works.
My VF page API version was 16.
Another question, some of the tabs now missing after the API change, for example:
<apex:tab label="Stage History" name="Stage History" id="tabstagehistory" rendered="{!$Profile.Id='00e00000006ophl'||$Profile.Id='00e00000006oo19'}" >
<apex:relatedList subject="{!opportunity}" list="OpportunityHistories" />
</apex:tab>
Following tabs (related lists) went missing after API version change:
Notes and Attachments
Approval History
Stage History
and a custom object "Competitive Analysis"
No error occurred.
<apex:tab label="Notes and Attachments" name="NotesAndAttachments" id="tabNoteAtt" rendered="{!$Profile.Id='00e00000006ophl'||$Profile.Id='00e00000006oo19'}" > <apex:relatedList subject="{!opportunity}" list="NotesandAttachments" /> </apex:tab> <apex:tab label="Approval History" name="Approval History" id="tabapprovalhis" rendered="{!$Profile.Id='00e00000006ophl'||$Profile.Id='00e00000006oo19'}" > <apex:relatedList subject="{!opportunity}" list="ProcessSteps" /> </apex:tab> <apex:tab label="Stage History" name="Stage History" id="tabstagehistory" rendered="{!$Profile.Id='00e00000006ophl'||$Profile.Id='00e00000006oo19'}" > <apex:relatedList subject="{!opportunity}" list="OpportunityHistories" /> </apex:tab> <apex:tab label="Competitive Analysis" name="Competitive analysis" id="taboppcompana" rendered="{!$Profile.Id='00e00000006oijt'||$Profile.Id='00e00000006qngS'}" > <apex:relatedList subject="{!opportunity}" list="oppcompanalysis__r" /> </apex:tab>
It is strange, I did not change any markup for the 4 tabs, but I deleted the tag in sandbox for one tab, and it comes back.
My profile ID is within the rendered range.
Not sure why this is happending.