omniphx / forrest

A Laravel library for Salesforce
https://omniphx.github.io/forrest/
MIT License
259 stars 120 forks source link

Related Objects #260

Closed jayomayan closed 4 years ago

jayomayan commented 4 years ago

Does anyone know how to query the related objects.

Example: Query the Contact's related Opportunities.

omniphx commented 4 years ago

Hi @jayomayan, this question is probably better suited for the Salesforce Stackexchange or the SF Developer forums

Generally, most queries will look like this for child relationships: SELECT Id, (SELECT Id FROM Cases) FROM Account

Or for parent relationship: SELECT Id, CreatedBy.Name FROM Account