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
Cole Russell 2Cole Russell 2 

Is there an easy way to check if my formula field is considered deterministic?

I am making updates to a specific formula field that is currently indexed. After I made the changes the field is no longer indexed (which is normal) and I contacted Salesforce Support to index the field again. They said the formula field no longer met the requirements to be indexed and after looking at the reference material I'm not sure what change I made caused this. Is there an easy way to check my formula and make sure it can indexed by Salesforce Support?
David Zhu 🔥David Zhu 🔥
You may check this blog. It tells you what kind of formula field is a deterministic filed.
https://developer.salesforce.com/blogs/engineering/2013/02/force-com-soql-best-practices-nulls-and-formula-fields.html
firdoss mohd 1firdoss mohd 1
Hi Cole Russell,

It looks like our team of experts can help you resolve this ticket. We have Salesforce global help-desk support and you can log a case and our Customer Success Agents will help you solve this issue. You can also speak to them on live chat. Click on the below link to contact our help-desk. Trust me it is a support service that we are offering for free!

https://jbshelpdesk.secure.force.com

Thanks,
Jarvis SFDC team
Alain CabonAlain Cabon
The most common reason is the use of a dynamic date and time function ( TODAY, NOW ).

Here are examples of common non-deterministic formulas. Force.com cannot index fields that:
  • Reference other entities (i.e., fields accessible through lookup fields)
  • Include other formula fields that span over other entities
  • Use dynamic date and time functions (e.g., TODAY, NOW)
A formula is also considered non-deterministic when it includes:
  • Owner, autonumber, divisions, or audit fields (except for CreatedDate and CreatedByID fields)
  • References to fields that Force.com 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: Product Family, IsActive, IsArchived
  • Solution: Status
  • Lead: Status
  • Activity: Subject, TaskStatus, TaskPriority

A Custom Index can't be created on these types of fields:
  • Multi-select Picklists.
  • Currency fields in a Multicurrency Organization.
  • Long text fields. 
  • Binary fields (fields of type blob, file, or encrypted text).