In hand-on challenge for SOQL Queries you need to write the query, that finds any contact that has a last name matching the first string, and mailing postal code (API name: MailingPostalCode) matching the second string. I looked for fieldName of last name of the contact object, but didn't find anything except "Name" in object manager -> contact -> fields & relationships, the same for mailing postal code. Intuitive query [SELECT ... FROM Contact WHERE LastName=:firstString AND MailingPostalCode=:secondString] actually works, but please help me to understand where can I find LastName and MailingPostalCode fields for Contact object
Hi @Nikita Sivakov,
Those are the compound field in salesforce. If you can't find under the Customize/contacts/Fields, The mailing address field contains MailingStreet, MailingCity, MailingState, MailingPostalCode and MailingCountry.
To know the list of fields and its API you can find it in the following object - https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contact.htm
You can also get the field list under Developer Console and File -> Open ->Object and then select the object to get the field names