Skip to content

Instantly share code, notes, and snippets.

@JodieM
JodieM / bundle.xml
Last active November 18, 2022 07:19
XML File
<?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>
@JodieM
JodieM / ContactAndLeadSearch.cls
Created February 24, 2020 08:56
RWC Week 2 Homework SOSL
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;
}
}