0 votes
1 view
in Salesforce by (10.6k points)

I have created a custom object with a name "billings" and having custom lookup field to the opportunity. So, I was trying to query all the billings records but it is throwing an error:

Unknown error parsing query

Can anyone help me with this?

1 Answer

0 votes
by (21.5k points)

In case of Nested queries in SOQL, you have to use __r for the child relationship name. You can try the below query it will help.

SELECT Id, StageName, ( SELECT Name, Email FROM Billings__r ) FROM Opportunity WHERE ID = '0011000002mfTil'

I hope this will help.

Want to become a Salesforce expert? join Salesforce certification now!!

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...