#1 Salesforce Training Tutorials
https://www.sown.io
Promote Your Salesforce App on This Channel:
/watch/A6wL80N3rmN3L
FULL PLAYLIST:
/playlist/PLy4r7dYHL5VdqoRUgVa_pO95uElwGaxkp
Create an Apex class that returns both contacts and leads based on a parameter.
To pass this challenge, create an Apex class that returns both contacts and leads that have first or last name matching the incoming parameter.
The Apex class must be called ContactAndLeadSearch and be in the public scope
The Apex class must have a public static method called searchContactsAndLeads
The method must accept an incoming string as a parameter
The method should then find any contact or lead that matches the string as part of either the first or last name
NOTE: Because SOSL indexes data for searching, you must create a Contact record and Lead record before checking this challenge. Both records must have the last name Smith. The challenge uses these records for the SOSL search