4

This is really simple but I can't figure out why it's not working

I'm trying to get the Account Name from Id

SELECT Id, Name FROM Account WHERE Id = "001d000001xxxxxxxx"

If I run this in the force developer console it says 'Unknown error parsing query'

2 Answers 2

10

Single quotes will work.

Any set of characters surrounded by single quotes. For example, String s = 'The quick brown fox jumped over the lazy dog.'; String size: Strings have no limit on the number of characters they can include. Instead, the heap size limit is used to ensure that your Apex programs don't grow too large.

Empty Strings and Trailing Whitespace: sObject String field values follow the same rules as in the SOAP API: they can never be empty (only null), and they can never include leading and trailing whitespace. These conventions are necessary for database storage.

SF APEX Documentation

0

Try wrapping the Id in single quote (') instead of double quotes (")

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .