This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<label>Account Default</label> | |
<protected>false</protected> | |
<values> | |
<field>sObject__c</field> | |
<value xsi:type="xsd:string">Account</value> | |
</values> | |
<values> | |
<field>Active__c</field> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ContactAndLeadSearch { | |
Public Static List<List<sObject>> searchContactsAndLeads(String searchTerm){ | |
List<List<sObject>> searchList = [FIND :searchTerm IN ALL FIELDS | |
RETURNING Contact(FirstName, LastName),Lead(FirstName,LastName)]; | |
Contact[] searchContacts = (Contact[])searchList[0]; | |
Lead[] searchLeads = (Lead[])searchList[1]; | |
return searchList; | |
} | |
} |