• Jessie Grenfell
  • 0 Points
  • Member since 2010

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1

I'm afraid I already know the answer to this, but does anyone have any ideas as to how I can refine this query so it doesn't hit the non-selective query issue?  The Contact object contains ~120,000 records.  The goal of the query is to check for potential duplicates when new Contacts are being inserted.  The variables here are various substrings of the first and last names of the new Contacts.  Any recommendations on fixing this or another way of accomplishing it would be very much appreciated.



List<Contact> lstDups = [Select Id, FirstName, LastName, Email, UNI__c from Contact where (FirstName =: c.FirstName and LastName =: c.LastName)
or (LastName =: c.LastName and FirstName like: strFirstL2)
or (LastName like: strLastL5 and FirstName like: strFirstL3)
or (LastName like: strLastR5 and FirstName like: strFirstL3)
or (Email =: c.Email and Email <> 'unknown@email.com')];



I just did a small visualforce page and saw that the date picker appears by default, i do not understand from where it came.. See Image below


Removed the apex:form tags and it disappears.. Did anyone face such similar issue???