pcraft@dryforcellc.com
Posts: 0
Joined: Sat Jan 25, 2014 3:44 am

Malformed Query error that was working last week

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: '+'"}]

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Malformed Query error that was working last week

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.

pcraft@dryforcellc.com
Posts: 0
Joined: Sat Jan 25, 2014 3:44 am

Malformed Query error that was working last week

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)

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Malformed Query error that was working last week

Thanks. Working on it. We'll update.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Malformed Query error that was working last week

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

pcraft@dryforcellc.com
Posts: 0
Joined: Sat Jan 25, 2014 3:44 am

Malformed Query error that was working last week

That appears to have fixed it. Thank you!

Return to “Issues”