Skip to content
Advertisement

Using Arraylist in Mule to query Salesforce

We are trying to query Salesforce with an ArrayList in the where statement.

Below is is the error we ran into when we tried using the ArrayList in the where clause.

Query we used against Salesforce:

JavaScript

successlist contains the values ['a1o90000001msXwAAI', 'a1o90000001msXxAAI'].

Error Message:

Message: Failed to invoke query. Message payload is of type: ArrayList

How do I resolve this error?

Advertisement

Answer

Unfortunately, you can’t use ArrayLists as parameters in Salesforce (or Database) queries. You’ll have to create the query dynamically with a script component.

Try this:

JavaScript

If you were using a Database, you would have to set the query type as dynamic:

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