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
DorababuDorababu 

Fieldset: contact name

hi,

Can anyone tell me if the contact name on detail page is saved as a field set?

My requirement is to save FirstName and LastName separately not as salesforce saves by default(title,firstname,lastname all put together). Is it possible to split and extract the FirstName and LastName through apex coding as i have to perform search of a contact(person account) based on FirstName or LastName.

 

Any help will be appreciated

 

 

Cory CowgillCory Cowgill
You can use Contact.FirstName and Contact.LastName. The Contact.Name field is concatenation of those two underlying fields. So its already split for you. If you are using Person Accounts you can use Account.FirstName and Account.LastName if the Account.IsPersonAccount == true.