Question

Salesforce Find Record by Query SOQL “MALFORMED_QUERY” error


Hi,

I have created one zap in which , I am taking instapage form submission data and based on it searching record by Id in salesforce. In find record by query action I am passing instapage variable which having salesforce record id as below,

 

Test action showing data as ,

 when I click on “Test & Continue” button. I am getting below error,

I am guessing that this error is coming as in test action sample data has passed as salesforce Id = DescriptionD. If I passed hardcorded Id it working fine. I want to pass variable to query to search the data dynamically.

Am doing wrong while passing variable or how to change sample data in the zapier?


13 replies

Userlevel 4
Badge +4

Hey @Sonal Gawde ,

 

Can you try by passing values in double quotes. For Eg = id = “Description Id” . 

Hi @jayeshkumarbhatia ,

I have tried that as well but error remains same !!

Userlevel 4
Badge +4

Hey @Sonal Gawde ,

 

Do you have any client events where id = DescriptionD ? You might be getting this error because there may not be data with this id and thus it is failing.

Hey @jayeshkumarbhatia ,

Basically I am integrating instapage with Salesforce using zapier. Instapage will pass Salesforce record id in the variable named “DescriptionD”. So I have pass same variable name in where clause of soql query.

But zapier is taking Instapage sample data as as below. I think because of sample data where clause is getting set as id=”DescriptionD”. Due to which soql query is getting failed.

How do I change sample data?

 

Userlevel 4
Badge +4

Understood @Sonal Gawde .

 

I guess there is no data from Instapage, thats why the keys and values are same in test data. Can you create a lead in Instapage, and than click on Load More in trigger test data? This will give you actual data from Instapage that you can use in Salesforce step.

 

 

Hi @jayeshkumarbhatia ,

I have created multiple leads using instapage. When I clicked load more , I am getting error as below,

 

Userlevel 4
Badge +4

Okay. @Sonal Gawde ,

 

Can you share screenshot of your Trigger event Setup on Zapier? Also, Can you share screenshot of any 1 lead that you created in Instapage?

Hi @jayeshkumarbhatia ,

Here are screenshots,

Insta page leads


 

 

Userlevel 4
Badge +4

I will suggest try following things to finish your Zap  

  1. Try to reconnect Instapage , create a new lead again and see if you can see more test data
  2. Else In your Salesforce Step, test the SQL Query with Static value and finish your Zap setup. Come back to Salesforce Step, replace static value with dyanamic value. If you get a message to test the action, than click on Skip Test, than switch ON the ZAP.

Kindly let me know if this works for you or not.

Hi @jayeshkumarbhatia ,

Your first suggestion has not worked for me !!

Second suggestion also not worked. With static value it is working fine !! getting object with fields,


As soon as I replaced static value with dynamic field. All fields from selection got vanished.

 

Userlevel 4
Badge +4

Okay. I suggest reach out to Zapier team here and report this issue.

Hey @jayeshkumarbhatia 

Just FYI , Today I have tried your second suggestion one more time. I have finished my zap setup with static value and then replace with dynamic value in query. after that I haven't opened "Paths A" later on. This trick some what partially worked for me. I mean fist time it is working correctly with real data then I tried second time for same record query is return wrong data.

Userlevel 4
Badge +4

Hey @Sonal Gawde , Thanks for updating on this question. I suggest check data in and data out from Zap history of both the Zap execution and try to debug it. Else i will suggest contact Zapier support team here

Reply