• Dipesh Kumar
  • NEWBIE
  • 12 Points
  • Member since 2015
  • Compnova


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hello all,

I have a custom relation master/detail  (Qoutes__r) between Quote and QuoteLineItem.
I have a class where i need to get some data from Quote and QuoteLineItem but I'm getting this error:
 
Error: Compile Error: Didn't understand relationship 'Quotes__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 35 column 16

Here my code:

LstQuotes = [SELECT q.id,q.QuoteNumber, q.Ad_Name__c,q.Type__c, q.Size__c,  q.Version__c, q.Bleed_Code__c,
   (Select Quotes__r.Advertiser_Account__c From Quotes__r)
   From Quote q
   where City_Code__c = :theId and q.Media_Name__c =: strMediaID];

The error is on this line (Select Quotes__r.Advertiser_Account__c From Quotes__r)

Thanks.

Hi All

I three custom objects those are Community_Member__c,question__c.answer__c

 when i tried the following query

Community_Member__c c=[select name,(select header__c from question__r ) from Community_Member__c ];

its giving following error

Compile Error: line 1, column 23: Didn't understand relationship 'question__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

here paren is Community_Member__c 

child is question__c

 

 

please help why i am getting error

 

 

 

thank you in advance

 

 

rajesh

I have 2 object:

- Contact

- Affiliation__c. There is a master-detail field called Contact__c on Affiliation which related Contact and Affiliation. (the Child Relationship Name is Affiliations)

 

 

Contact[] conts = new List<Contact>(); conts = [select Id, (select Id from Affiliations__r where Type = 'Volunteer') from Contact where ID in :contIDs ];

 

I get the following error:" Didn't understand relationship 'Affiliations__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. "

 

Any ideas?

Thanks

Pierre