Lookup fields with autocomplete are not reliably loading a list of matching records

  • 1
  • Problem
  • Updated 2 years ago
  • In Progress
We are seeing some intermittent performance issues, particularly around lookup fields.

As an example, on our main Contact override page, we load in several related models, particularly Affiliations and Relationships (we use NPSP on Salesforce). When we want to add a new Relationship to a Contact - we have an autocomplete lookup field in a table where the user is supposed to type the name of the person they want to create a connection for. The issue is that sometimes this works exactly as designed - they start typing and quickly see a list of all matching Contacts. However, sometimes the loading circle will spin on the right hand side of the lookup field for a seemingly infinite amount of time. It seems that it is somehow getting hung up in its search. If you delete a few letters and retype them a few times, sometimes that will make the search results appear. Sometimes you have to delete and retype the whole name except for the last letter. Sometimes you have to reload the whole page. 

The same behavior will occur sometimes on other autocomplete fields connected to other models, so I don't think its necessarily related to Contacts specifically. I can try to keep an eye out for which ones in particular seem to be problematic if that is helpful. Is anyone else experiencing anything like this?
Photo of Heather Hart

Heather Hart

  • 120 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
How many contacts are there that it is trying to search through? It could be that there are so many that the model needs to be indexed by Salesforce.
Photo of Heather Hart

Heather Hart

  • 120 Points 100 badge 2x thumb
Hi Stephen, thanks for the reply. We do have sort of a lot of contacts, 425,000, however I don't think it is necessarily having problems searching in all circumstances. For example, we have a Contact Tab override skuid page which is a table element with a search box at the top. I can search for contacts using that box with relative speed (it may take a second or two but nothing extreme) and the table updates as expected. Searching natively in Salesforce seems to be relatively responsive as well.

This seems to be specific to Lookups. I just tried turning on SOSL search on some of these fields and I will see if that improves things at all.
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
That sounds like a good approach. Let me know if that helps.