You need to sign in to do that
Don't have an account?
陳蕙心 Cymbi Chen
Using Field that don't exist? Trailhead Challenge: Write SOQL Queries
I think I have skipped some instruction there and pozzled with the outcome of this unit. What kind of key words sould I use to ferther understand this topic?
The scenario is that I finished the unit Chanllenge with code as fallowing:
How could the code be using Field that don't evern exist in Contact and not be compile error? What kind of key words sould I use to ferther understand this topic?
The scenario is that I finished the unit Chanllenge with code as fallowing:
public class ContactSearch { public static List<Contact> searchForContacts(string targetLastName, string targetPostalCode) { List<Contact> matchCon = [select ID,Name from Contact where LastName = :targetLastName and MailingPostalCode = :targetPostalCode]; return matchCon; } }But in the object manager of Contact, I didn't see any field named: LastName and MailingPostalCode.
How could the code be using Field that don't evern exist in Contact and not be compile error? What kind of key words sould I use to ferther understand this topic?
You can see the fileds of any object under Fields.If you are in classic go to SetUp--build--customize--contact--fields. I would suggest you read the content from the first unit of the module and then attempt the challenge so that you can learn more.
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya
All Answers
Concatenation of FirstName, MiddleName, LastName, and Suffix up to 121 characters.)
MailingPostalCode is part of the mailing address compound field. Please refer this link
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_address.htm
You can see the fileds of any object under Fields.If you are in classic go to SetUp--build--customize--contact--fields. I would suggest you read the content from the first unit of the module and then attempt the challenge so that you can learn more.
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya