1
votes

Genuinely surprised that I cannot find this anywhere and apologies in advance if it is obvious.

When a field is of type "Name" how do you get the individual fields in that Name object (e.g. First Name) in Apex? Likewise if the field type is Address, how do you get the City, etc?

2

2 Answers

0
votes

In Contact object, Name field is concatenation of FirstName and LastName fields. And same in address field.

0
votes

In Salesforce, there are many fields which are hidden on any object.

For contacts, Name = Salutaion + FirstName + LastName

Refer to following link for all the fields;

http://www.salesforce.com/us/developer/docs/api/Content/system_fields.htm