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
rajesh_yrajesh_y 

need help in query

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

Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

Here is the answer :

 

http://boards.developerforce.com/t5/General-Development/need-help-in-query/td-p/278969

 

This is a duplicate post.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

All Answers

Chamil MadusankaChamil Madusanka

Have you created a relationship between  Community_Member__c and  question__c? If you have created Community_Member__c will get a child relationship named as "Questions_r"

 

TRY this:

replace the question__r by Questions_r or questions_r.

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

 

--

Chamil Madusanka

 

Ankit AroraAnkit Arora

Here is the answer :

 

http://boards.developerforce.com/t5/General-Development/need-help-in-query/td-p/278969

 

This is a duplicate post.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

This was selected as the best answer
rajesh_yrajesh_y

thank you for yor answer

Dipesh KumarDipesh Kumar
For parent-to-child relationships, the parent object has a name for the child relationship that is unique to the parent, the plural of the child object name. For example, Account has child relationships to Assets, Cases, and Contacts among other objects, and has a relationshipName for each, Assets, Cases, and Contacts
check this link for help.....
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_understanding.htm