Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

parameterized_search_control

Auxiliary for Controlling Parametrized Searches


Description

A function for allowing finer grained control over how a search is performed when not using SOSL

Usage

parameterized_search_control(
  objects = NULL,
  fields_scope = c("ALL", "NAME", "EMAIL", "PHONE", "SIDEBAR"),
  fields = NULL,
  overall_limit = 2000,
  default_limit = 200,
  spell_correction = TRUE
)

Arguments

objects

character; objects to search and return in the response. Multiple objects can be provided as a character vector

fields_scope

character; scope of fields to search in order to limit the resources used and improve performance

fields

character; one or more fields to return in the response for each sobject specified. If no fields are specified only the Ids of the matching records are returned.

overall_limit

numeric; the maximum number of results to return across all objects in the search.

default_limit

numeric; the maximum number of results to return for each of the specified objects. This parameter is ignored if the objects argument is left NULL.

spell_correction

logical; specifies whether spell correction should be enabled for a user’s search.

Value

list of parameters passed onto sf_search

References

Examples

## Not run: 
# free text search only on Contact record Phone fields
# this will improve the performance of the search
my_phone_search <- "(336)"
search_result <- sf_search(my_phone_search,
                           objects = c("Contact", "Lead"),
                           fields_scope = "PHONE",
                           fields = c("Id", "FirstName", "LastName"))

## End(Not run)

salesforcer

An Implementation of 'Salesforce' APIs Using Tidy Principles

v0.2.2
MIT + file LICENSE
Authors
Steven M. Mortimer [aut, cre], Takekatsu Hiramura [ctb], Jennifer Bryan [ctb, cph], Joanna Zhao [ctb, cph]
Initial release
2020-09-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.