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
Kevin DombroskiKevin Dombroski 

Write SOQL Queries

I guess this is a full on newbie question, but I'm working on the Challenge  Developer Beginner  > Apex Basics & Database > Write SOQL Queries... the unit shows sample queries like  "SELECT FirstName,LastName FROM Contact" which work fine when I execute. My question is: when I look at the Contact Object/entity/table, it does not list these fields (see screenshot below). Can someone steer me in/explain why the query works when I don't see these fields/columns!?   LMK - thanks! 

Here is a search Field names like "Last" - I don't see LastName?! 

Screenshot of Field Names for the Contact Object - no LastName listed
Best Answer chosen by Kevin Dombroski
Rahul.MishraRahul.Mishra
Hi Kevin,

FirstName and LastName fields are standard fields provided by salesforce and these fields will always be present on contact and can't be deleted.
When we search those fields in lightning, it shows only the name field , which is basically a First Name + LastName, while in classic you can see firstName, lastName and Name field.

Attaching the screenshots from both:

User-added image

Classic

User-added image


There are some already existing issues in lightning realted to those fields. Source : https://success.salesforce.com/issues_view?id=a1p30000000jd3OAAQ
Mark solved if you have got the answer.

All Answers

Rahul.MishraRahul.Mishra
Hi Kevin,

FirstName and LastName fields are standard fields provided by salesforce and these fields will always be present on contact and can't be deleted.
When we search those fields in lightning, it shows only the name field , which is basically a First Name + LastName, while in classic you can see firstName, lastName and Name field.

Attaching the screenshots from both:

User-added image

Classic

User-added image


There are some already existing issues in lightning realted to those fields. Source : https://success.salesforce.com/issues_view?id=a1p30000000jd3OAAQ
Mark solved if you have got the answer.
This was selected as the best answer
Kevin DombroskiKevin Dombroski
Thanks for clarifying - I didn't realize that "Name" was a structure/data object, so now of course it all makes sense. Perhaps that was explained in one of the Trailhead units but I was not paying attention :-). If anyone from Trailhead curriculum is listening, I think that would be worth mentioning in the exercise as a reminder/refresher.  Thanks again Rahul!