I am trying to run a select in Salesforce as follows:
SELECT [Account].* FROM [Account] WHERE [Account].Id IN ('123456789012345678')
but gives an error: "Unknown error parsing query" How can i do this selection ?
I am trying to run a select in Salesforce as follows:
SELECT [Account].* FROM [Account] WHERE [Account].Id IN ('123456789012345678')
but gives an error: "Unknown error parsing query" How can i do this selection ?
SOQL is not SQL. The SQL syntax you're using here is not valid in Salesforce. You can learn the basics of SOQL in the Write SOQL Queries unit on Trailhead or the SOQL and SOSL Reference.
Until the Spring '21 release of Salesforce, there is no support for a SELECT *
wildcard. You must spell out all fields explicitly. Once your org is upgraded to Spring '21 (the release is in progress as of this writing), you'll be able to use FIELDS(ALL)
. At that point, your query would look like this:
SELECT FIELDS(ALL) FROM Account WHERE Id IN ('123456789012345678')
Note that you must be using API version 51.0 to connect to Salesforce in order to use this function. You may return up to 200 records.
© 2022 - 2024 — McMap. All rights reserved.