sf_search {salesforcer} | R Documentation |
Perform SOSL Search
Description
Searches for records in your organization’s data.
Usage
sf_search(
search_string,
is_sosl = FALSE,
guess_types = TRUE,
api_type = c("REST", "SOAP", "Bulk 1.0", "Bulk 2.0"),
parameterized_search_options = list(...),
verbose = FALSE,
...
)
Arguments
search_string |
|
is_sosl |
|
guess_types |
|
api_type |
|
parameterized_search_options |
|
verbose |
|
... |
arguments to be used to form the parameterized search options argument if it is not supplied directly. |
Value
tibble
Note
The maximum number of returned rows in the SOSL query results is 2,000. Please refer to the limits HERE for more detail.
References
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl.htm
Examples
## Not run:
# free text search
area_code_search_string <- "(336)"
search_result <- sf_search(area_code_search_string)
# free text search with parameters
search_result <- sf_search(area_code_search_string,
fields_scope = "PHONE",
objects = "Lead",
fields = c("id", "phone", "firstname", "lastname"))
# using SOSL
my_sosl_search <- paste("FIND {(336)} in phone fields returning",
"contact(id, phone, firstname, lastname),",
"lead(id, phone, firstname, lastname)")
sosl_search_result <- sf_search(my_sosl_search, is_sosl=TRUE)
## End(Not run)