function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SweetBoxSweetBox 

Cannot retrieve First Name and Last Name fields from User table

I am doing a call on the user table an whenever I enter the "first name" field for my select list it produces the following.  If I user other fields that do not contain spaces then the query is successful.

"Bad field name 'first name' in select list of query call"

DevAngelDevAngel

Hi SweetBox,

Busy today aren't we.  There are no fields defined in sforce that contain a space in the field name designation.  The fieldnames typically adhere to common programming conventions for variable naming.  For instance, they don't start with a number, don't contain "illegal" characters such as a space and start with a lower case alpha.  The best way to determine the correct field names is to use the describe call as explained in the doc.

Cheers.

SweetBoxSweetBox

Ok I thought so but page 77 of the SDK documentation the PDF version has spaces for Last Name and First Name, Company Name etc.  I notice for other tables you either do not have spaces or have underscores between words.

Thanks for the quick responses