Page 1 of 1

Malformed Query error that was working last week

Posted: Sat Jan 25, 2014 3:44 am
by pcraft@dryforcellc.com

I'm getting an malformed query error that was working correctly last week. No change has been made on my end. I'm connecting to Salesforce via rest.

my query function is:
var user = localStorage.getItem("userName");
var pass = localStorage.getItem("password");
return "SELECT Id FROM Account WHERE Portal_Loginc='"+user+"' AND Portal_Passwordc='"+pass+"'";

It works fine in a test, but in production I'm getting:
[{"errorCode":"MALFORMED_QUERY","message":"\nSELECT+Id+FROM+Account+WHERE+Portal_Loginc='#####'+AND+Portal_Passwordc='#####'\n \nERROR at Row:1:Column:6\nunexpected token: '+'"}]


Malformed Query error that was working last week

Posted: Sat Jan 25, 2014 4:26 am
by Alena Prykhodko

Hello,

Please clarify what do you mean under 'production'?
Share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a, tell us its name and steps to test.


Malformed Query error that was working last week

Posted: Sat Jan 25, 2014 2:40 pm
by pcraft@dryforcellc.com

I have shared it with you.

Production isn't really clear. If I test the service it succeeds, but if I run the test app it fails. It's able to successfully log in, but the first query I try says it's malformed.

The app is named Vendorportal. You can just run the app, it's hard coded to login, and then asks for a login and password. It's just doing a query against some custom fields, so you can really just enter anything. At this point the query just fails. Even if you entered the wrong user name and password it should succeed and take you to a blank page. (which was working for the past month or so)


Malformed Query error that was working last week

Posted: Sat Jan 25, 2014 5:25 pm
by Alena Prykhodko

Thanks. Working on it. We'll update.


Malformed Query error that was working last week

Posted: Mon Jan 27, 2014 10:48 am
by Maryna Brodina

Hello! Sorry for a late reply. Please try to the way it's done in plugin. In service URL set pre{url}/services/data/{rest_api_version}/query/?q={soql}/preq request parameter rename to soql


Malformed Query error that was working last week

Posted: Mon Jan 27, 2014 2:16 pm
by pcraft@dryforcellc.com

That appears to have fixed it. Thank you!