You need to sign in to do that
Don't have an account?
CaptaConsulting
Soql query error with the AJAX Toolkit
Hi,
When I execute my AJAX code:
........
_qrLeads = sforceClient.Query("Select Id, LastName, FirstName, State, Email , CreatedDate, LastModifiedDate, OwnerId From Lead where CreatedDate >= 2005-01-01 and CreatedDate
alert("_qrLeads: "+_qrLeads)
........
I get this error:
_qrLeads: faultstring: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
faultcode: soapenv:Server
SOQL: Select Id, LastName, FirstName, State, Email , CreatedDate, LastModifiedDate, OwnerId From Lead where CreatedDate >= 2005-01-01 and CreatedDate
If I executed this query in the sforce Explorer works perfect.
Thanks.
When I execute my AJAX code:
........
_qrLeads = sforceClient.Query("Select Id, LastName, FirstName, State, Email , CreatedDate, LastModifiedDate, OwnerId From Lead where CreatedDate >= 2005-01-01 and CreatedDate
alert("_qrLeads: "+_qrLeads)
........
I get this error:
_qrLeads: faultstring: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
faultcode: soapenv:Server
SOQL: Select Id, LastName, FirstName, State, Email , CreatedDate, LastModifiedDate, OwnerId From Lead where CreatedDate >= 2005-01-01 and CreatedDate
If I executed this query in the sforce Explorer works perfect.
Thanks.
Hi CaptaConsulting,
Sounds like this might be a date only field serialization problem. I'll check it out.
To follow up, (it was hard to get the code to display well) you would then use sforceClient.Query2(soql, handler) to run your query. This will properly encode the less than and greater than symbols in the soql statement to result in well formed xml for the soap message.
Thanks for the catch.
aj
I don´t know what are the code inside de "replace" call....
soql.replace(¿HERE which is the code?, ">");
Thanks.
Victor Alvarez
Capta Consulting
Thanks Dave.
Victor Alvarez
Capta Consulting