You need to sign in to do that
Don't have an account?
akoch
URL Encode Cross Object Query for REST API
I am trying to integrate Opportunity details including the associated products into a 3rd parts system via the REST API. Currently we're capturing other information through a GET request and encoding the query in the API. This has proven difficult to do for the Opportunity details, and I believe this is because a cross object query is required. For example, the SOQL to do this looks something like:
Thanks in advance!
SELECT Id, Name, ( SELECT PricebookEntry.Product2Id FROM OpportunityLineItems ) FROM OpportunityIs there a way to encode this into a format that fits with
https://INSTANCE.my.salesforce.com/services/data/v45.0/query/?q=SELECT....
Thanks in advance!
Below URL works for me, did you try this?
/services/data/v29.0/queryAll/?q=SELECT+Name,(SELECT+PricebookEntry.Product2Id+FROM+OpportunityLineItems)+from+Opportunity+limit+5
All Answers
Below URL works for me, did you try this?
/services/data/v29.0/queryAll/?q=SELECT+Name,(SELECT+PricebookEntry.Product2Id+FROM+OpportunityLineItems)+from+Opportunity+limit+5
Thank you Shlvl!