Salesforce - Search using SOQL - Variable in SOQL activity

Dear All,

when using the “search using SOQL” activity we face the following problem:

Using the following query we receive 0 results:

Assign: Customer_number = “123”
SOQL:
“Select Id from Account where Customer_number_c = ‘<Customer_number>’”

Using this query instead we receive the wanted result:

SOQL:
“Select Id from Account where Customer_number_c = ‘123’”

How can we use the variable in the SOQL activity?

Thanks!

Try to build the SOQL query (in an Assign activity) before the Search using SOQL.
Then try to use that variable in the activity.
Double check that variable to have the correct syntax before its use.
If is still not working, raise a support case.

1 Like

Thank you for your reply. I have tried it but it did not work.
Actually, now even my second approach is not working anymore.

I will raise a ticket.

After having created a support ticket it suddenly worked as you described.
But since it is unstable I have recommended to investigate it.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

maybe you can also try
“Select Id from Account where Customer_number_c = ‘“+Customer_number+””
instead of
“Select Id from Account where Customer_number_c = ‘<Customer_number>’”

1 Like