Gayan Hemachandra
Gayan Hemachandra

Reputation: 41

SalesForce SOQL MALFORMED_QUERY errorCode

I tried to retrieve data through the Postman. But I'm getting MALFORMED_QUERY

ERROR at Row:1:Column:97
line 1:97 no viable alternative at character ' ' /services/data/v35.0/query?explain=SELECT AccountNumber,Id,Name,Phone FROM Account where LastModifiedDate >= 2018-03-19T12:55:52.000+0000 and LastModifiedDate <= 2018-03-31T12:55:52.000+0000

Upvotes: 0

Views: 1659

Answers (1)

Noor A Shuvo
Noor A Shuvo

Reputation: 2817

No such column AccountNumber exists on entity Account. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name.

That is if there is a custom field called AccountNumber, then the query will be

SELECT AccountNumber__c, Id,Name,Phone, LastModifiedDate  FROM Account where LastModifiedDate >= 2018-03-19T12:55:52.000+0000 and LastModifiedDate <= 2018-03-31T12:55:52.000+0000

Upvotes: 0

Related Questions