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
Lee SadlerLee Sadler 

I have 2 custom objs Project (Parent) & BOM (Child). I want to list projects that have no BOMs Select Id, Name, BOM_Item__r.name from Project__c … where clause but “get didn’t understand relationship error” can you help?

Andrew GAndrew G
Try something like:
SELECT Name, (SELECT Id FROM BOM__r) FROM Project__c
note, you will need to check what the relationship name is for the lookup between Projects and BOMs.  If the relationship name is BOMs, then adjust as
SELECT Name, (SELECT Id FROM BOMs__r) FROM Project__c
This document (https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm)may provide more details/explanations

regards
Andrew
Lee SadlerLee Sadler
Many thanks - it was just child relationship name I had incorrect