Salesforce SOQL - Pass Object Type as Parameter

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

Hi @Tommy,

If you attempting to get the Object Type from pipeline parameters please try this way(screen below) :

Let me know if you have any questions.

Regards,
Spiro

Hi @Spiro_Taleski ,

It is a value from input schema not a pipeline parameter. It is populated correctly as you can see from the output preview in my screenshot. However when running the validation i get the error “cannot lookup property on null value”. The value is not null.

Hi @Tommy,

Can you please provide screenshot containing configuration of the upstream snap that you are using?

Thanks,
Spiro

Hi @Spiro_Taleski. Sure. The upstream snap is a mapper…

I have also tried hard coding this is a mapper to rule out any schema issues:

I still get the error below on both methods:

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:

Regards,
Spiro

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