0

I am working on a requirement where I need to use phone fields in where clause of the apex code, and I need those fields to be indexed. I contacted support to request they index a set fields, and they did so for all fields apart from HomePhone. When I asked why that field was omitted, the reply that I got from support was that they cannot index the Homephone field due to certain limitations. I requested them to provide a reason for that, and they in turn asked me to put a question in developer forum.

This omission is not stopping any work and I already started to use another field for the code. What limitations prevent indexing of the HomePhone field?

4
  • Salesforce decides what fields can and cannot be indexed. We don't have a way around that as such. I'm skeptical of a design that requires a phone field to be indexed.
    – David Reed
    Feb 19, 2018 at 22:54
  • Typically, if you need to search on phone fields, consider using SOSL instead. Phone fields are Searched Indexed, but not Database Indexed.
    – sfdcfox
    Feb 19, 2018 at 23:10
  • Can you convert HomePhone field to HomePhone__E164__c via a simple trigger and then request the custom field to be indexed? Getting to E.164 format is straightforward for North American Numbering Plan and selected other countries if you're willing to exclude extensions.
    – cropredy
    Feb 20, 2018 at 1:18
  • @DavidReed, yes. I agree with that. but there is some issue with my salesforce instance where I cannot use HomePhone field in simple SOQL query as well. I sent a ticket to salesforce to ask about what is the issue with with particular org.
    – KSL
    Feb 22, 2018 at 17:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.