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
SeksakiSeksaki 

soql with child object lookup not working

Hello,
I have a lookup relashionship between Contract (Parent) and  DeliveryPoint (child), i want to retrive the delivery point from one or every contract but the query not work:
 
SELECT Id ,(select id DeliveryPoint__r) FROM Contract

Thanks for Help
ShirishaShirisha (Salesforce Developers) 
Hi Seksaki,

Greetings!

Seems like you missed FROM clause from inner query.Please use the below SOQL query:
 
SELECT Id ,(select id FROM DeliveryPoint__r) FROM Contract

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
SeksakiSeksaki
Hi Shirisha,

just it's a typo
i use  the query with "From" but also the same error:

Didn't understand relationship 'DeliveryPoint__r' in FROM part of query call.