omniphx / forrest

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

Help: How to access childSObject #293

Closed shahvirag closed 3 years ago

shahvirag commented 3 years ago

I am able to access child relationships

Forrest::sobjects('Opportunity/describe')

Capture I want to post consent. How can i do that?

omniphx commented 3 years ago

You can access the child object with a new request: Forrest::sobjects('Consent_and_Declaration__c/describe')

jqr91 commented 1 year ago

It's works but how can we get the related data without querying with sobject ??

For example:

Forrest::sobjects("Account/Studies/describe")

For me, return an error: Provided external ID field does not exist or is not accessible

omniphx commented 1 year ago

Are you using the correct API name for the Studies field? If it's a non-standard field it would probably look something like this: Forrest::sobjects("Account/Studies__c/describe")

Also, if you just looking for data. You would want to use query() instead of sobjects()