character
; string to search using parameterized search
or SOSL. Note that is_sosl must be set to TRUE and the string valid in order
to perform a search using SOSL.
logical
; indicating whether or not to try the string as SOSL
logical
; indicating whether or not to use col_guess()
to try and cast the data returned in the recordset. If TRUE
then
col_guess()
is used, if FALSE
then all fields will be returned
as character. This is helpful when col_guess()
will mangle field values
in Salesforce that you'd like to preserve during translation into a tbl_df
,
like numeric looking values that must be preserved as strings ("48.0").
character
; one of "REST"
, "SOAP"
,
"Bulk 1.0"
, or "Bulk 2.0"
indicating which API to use when
making the request.
list
; a list of parameters for
controlling the search if not using SOSL. If using SOSL this argument is ignored.
logical
; an indicator of whether to print additional
detail for each API call, which is useful for debugging. More specifically, when
set to TRUE
the URL, header, and body will be printed for each request,
along with additional diagnostic information where available.
arguments to be used to form the parameterized search options argument if it is not supplied directly.
tibble
The maximum number of returned rows in the SOSL query results is 2,000. Please refer to the limits HERE for more detail.
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl.htm
if (FALSE) {
# 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)
}