Skip to content
Advertisement

Saleforce retrieving fields from two different objects – (SOQL) Simple Salesforce Python

I am using simpleSalesforce library for python to query SalesForce.

I am looking at two different object in SalesForce: Account and Backend (parent-child). The Id in account matches the records of Backend through acc_id

I am trying to do this:

But I get the response showing:

Malformed request – didn’t understand the relationship – in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the ‘__r’ after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.”, ‘errorCode’: ‘INVALID_TYPE’}]

What am I doing wrong how can I fix this?

Advertisement

Answer

Read up about relationships

Most likely your query has to be something like

or even

Or if you want it flat

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement