Duration
10 minutes
Goals
Execute a FIND statement and display the results. For simplicity, we will display the returned Ids and Object names but will not use the Ids in SELECT statements to get the matching data.
Required assets
The provided Resources folder for this exercise contains a subfolder named Completed with a solution you can use to check your work. This lab is a continuation of the previous one. If you did not complete the previous exercise, you can use the Completed solution from the previous part as starter code for this part.
Exercise overview
This exercise is a continuation of the previous one. Here you will:- Search for the term "International" in the Campaign and Lead Salesforce Objects.
- Convert the returned
SearchResult
objects to strings. - Display the strings to the user.
Steps
Below are the step-by-step instructions to implement the exercise.
Run a SOSL search
-
Open
CampaignsPage.cs
. -
Add the method shown below to the
CampaignsPage
class. Your goal is to complete the implementation using the additional instructions below.async Task<List<string>> GetSearchResultsAsync() { ... }
-
Write a SOSL query that uses
FIND
to locate the term "International" in theNAME FIELDS
of theCampaign
andLead
Salesforce Objects. The solution is provided here, hidden behind a link: Show Code