Custom query Salesforce import

  • 4 January 2024
  • 2 replies

Userlevel 2
Badge +5


I would like to do an import of  a Salesforce report with 13000 lines.

To do so I need to use the custom query import mode.

The problem I have is that i need to use some fieds located in Opportunity table and other in Lead table.

I wrote :
Select Field A, Field B
From Lead , Opportunity

but it is not working.


Can you help me ?





Best answer by Julien 9 January 2024, 16:48

View original

2 replies

Userlevel 2
Badge +5

UP :) 

Userlevel 3
Badge +5

Hi @Cedric LJ, when you say it is not working do you mean you get an error or the results aren’t the ones you expect?

You probably need to add a WHERE clause to specify how the data should be referenced between the 2 tables.

Check the Relationship Queries from SFDC’s documentation for some examples on how you can format your query:


Maybe something like this would work?

SELECT Lead.FieldA, Opportunity.FieldB
FROM Lead, Opportunity
WHERE Lead.ConvertedAccountId = Opportunity.AccountId