Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
RKR1685519471
Contributor

Salesforce SOQL query from multiple objects

I am trying to get quote data from an existing SOQL query that works fine in Salesforce and the same works in Jitterbit, and the query involves 3 objects (Account, Opportunity and Quote)

soql query i am trying to execute 'SELECT Id,Opportunity_Company__c, Account_Customer_ID__c, Opportunity_Customer_Number__c, Ship_To_Number__c, Tax, Opportunity_Account_Territory__c, TotalPrice, Opportunity_Sales_Rep_Code__c, Opportunity_Id,Opportunity_Name,Quote_Number__c, ,Opportunity_Currency_Code_f__c,Status FROM Quote where Opportunity_Account_Division__c = 'Industrial Products' and Opportunity_RecordType.Name = 'Project Opportunity Record' And Opportunity_Company__c != null And Opportunity_Customer_Number__c != null And Opportunity_Sales_Rep_Code__c != null Order by Opportunity_Company__c'

I have set the column delimiter as '_' under advanced settings of the tsalesforceinput object. Below is the error i am getting

No such column 'Opportunity_Epicor_Company__c' on entity 'Quote'

Is there a way to execute soql query or do i need to get data separately and compare.

Labels (3)
2 Replies
Anonymous
Not applicable

Hello @Ramesh KR​ ,

It's ok to query multiple objects by SOQL query in tSalesforceInput component if there are relationships between them.

e.g. the below query is working fine in tSalesforceInput component

SELECT Id, Name, Account.Name

FROM Contact

WHERE Account.Industry = 'media'

 

Could you please check if you have created relationship Account and Opportunity in Quote object in the salesforce console?

if yes, you can query the fields of Account and Opportunity in Quote object by using SOQL like

Select Id, Opportunity.Company__c, Account.Customer_ID__c ... FROM Quote ...

 

please refer to

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_query_using.htm

RKR1685519471
Contributor
Author

Thanks Achen. I dont have permission on the salesforce side but i can check. In the meantime, tsalesforceinput component started giving out data when i changed the QueryMode property from 'Query' to 'Bulk' , not sure what this means.