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
Dan WarrenDan Warren 

Index Component Fields

On a Contact / PersonAccount I believe the Name field is indexed by default.

This consists of component fields including FirstName, LastName.

Are these individual component fields indexed too?

If not, is it possible to get LastName indexed?

Roshni RahulRoshni Rahul
Hi Dan,

If you query, we get FirstName and LastName together as indexed.
But that doesnt mean they are indexed individually.
If you want to make a field indexed,

1. One way that custom indexes get created is by Salesforce’s auto-indexer.
2. Another other way custom indexes appear is even simpler–someone in your org might have proactively logged a case with Salesforce Support requesting a custom index to help the response time for a query.

Hope it helps. If this is informative, please mark the answer as best answer

Regards
Roshni