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
thaifishythaifishy 

Need help locating a User in sforce db

In the SalesForce User form, there is a field: "Name".  How does that map into the sforce db?

Let's say my application is trying to locate a User with the Name: "John Wilkes Booth". 

I'd like to be able to do this query:

select Id from Account where Name = '"John Wilkes Booth"'

but receive this error:  "INVALID_FIELD: Invalid name: name in User"

The only way I can see to do this is to somehow break down "John Wilkes Booth" into a User.FirstName and User.LastName and then query.  Is that the only way to accomplish my goal?

 

adamgadamg
Yes. The documentation should provide details on the data model. Also, at sforce.sf.net there is a query tester that should help you quickly build what you need.
thaifishythaifishy

Thanks!  That tool on sourceforge proved to be useful!