Custom indexes can be created on deterministic formula fields. Because some values vary over time or change when a transaction updates a related entity, the platform cannot index non-deterministic formulas.
Here are examples of things that make formula fields non-deterministic.
Non-deterministic formula fields can:
- Reference other entities (like fields accessible through lookup fields)
- Include other formula fields that span over other entities
- Use dynamic date and time functions (for example, TODAY and NOW)
These formula fields are also considered non-deterministic
- Owner, autonumber, divisions, or audit fields (except for CreatedDate and CreatedByID fields
- References to fields that Lightning Platform cannot index
- Multi-select picklists
- Currency fields in a multicurrency organization
- Long text area fields
- Binary fields (blob, file, or encrypted text)
- Standard fields with special functionalities
- Opportunity: Amount, TotalOpportunityQuantity, ExpectedRevenue, IsClosed, IsWon
- Case: ClosedDate, IsClosed
- Product: ProductFamily, IsActive, IsArchived
- Solution: Status
- Lead: Status
- Activity: Subject, TaskStatus, TaskPriority
- Note: If the formula is modified after the index is created, the index is disabled. To re-enable an index, contact Salesforce Customer Support.
0 Comments