Salesforce Lightning: Global Search

Today we will have a look at creating a custom global search using Lightning and SOSL. We will use SOSL to query the results from database and show it on the lightning component using the lightning:datatable tag SOSL is preferred over SOQL in use cases where we want to search for a particular keyword across different objects. The return type of SOSL will be a list of list of sobjects. List<List<sObject>> searchResult = [FIND :searchKey IN ALL FIELDS RETURNING Account (Id, Name, AccountNumber, Website), Co...