cancel
Showing results for 
Search instead for 
Did you mean: 

Salesforce SOQL - Pass Object Type as Parameter

Tommy
New Contributor III

Hello,

Is it possible to pass the “Object Type” into a Salesforce SOQL Snap (or Salesforce lookup or Salesforce Read)

I want to dynamically pull data from multiple salesforce objects and pull them into my SQL DB using a lookup table. However, when trying to use a parameter in the “Object Type” field, i get an error, despite the parameter not being null. See attached.

Thanks

image

1 ACCEPTED SOLUTION

SpiroTaleski
Valued Contributor

Hi @Tommy

I have tried the same approach using the Salesforce Read Snap and get the same error message. It looks like a SnapLogic bug that does not allow to get the value from the input schema for that field.

If you are using the Salesforce Read Snap you can specify the Object type from the pipeline parameters(ex : _SFObject).

If you are using the Saleforce SOQL Snap then you can specify the object type dynamically from the input schema in the SOQL query section of the Snap:

image

Regards,
Spiro

View solution in original post

8 REPLIES 8

SpiroTaleski
Valued Contributor

Hi @Tommy

I have tried the same approach using the Salesforce Read Snap and get the same error message. It looks like a SnapLogic bug that does not allow to get the value from the input schema for that field.

If you are using the Salesforce Read Snap you can specify the Object type from the pipeline parameters(ex : _SFObject).

If you are using the Saleforce SOQL Snap then you can specify the object type dynamically from the input schema in the SOQL query section of the Snap:

image

Regards,
Spiro

Tommy
New Contributor III

Thanks @Spiro_Taleski.

I was already passing the object in the SOQL dynamically. I hadn’t even considered leaving the “Object Type” field blank. That worked. Thanks

clinton_hemmant
New Contributor III

Hi

I have the same problem, except with the Salesforce Update

Regards

Clinton

SpiroTaleski
Valued Contributor

@clinton_hemmant 

If you want to set the Salesforce object dynamically: 

1) Make sure the value of the field "salesforceObject"(that you are passing to the Salesforce Update Snap) from the upstream snap(perhaps is Mapper Snap) is not null. 

2) Check if you are actually sending the field "salesforceObject" from the upstream snap to the Salesforce Update. 

A screenshot from the upstream snap will help here debugging the issue. 

BR,

Spiro Taleski