sf_upsert | R Documentation |
Upserts one or more new records to your organization’s data.
sf_upsert( input_data, object_name, external_id_fieldname, api_type = c("SOAP", "REST", "Bulk 1.0", "Bulk 2.0"), guess_types = TRUE, control = list(...), ..., all_or_none = deprecated(), verbose = FALSE )
input_data |
|
object_name |
|
external_id_fieldname |
|
api_type |
|
guess_types |
|
control |
|
... |
arguments passed to |
all_or_none |
|
verbose |
|
tbl_df
of records with success indicator
## Not run: n <- 2 new_contacts <- tibble(FirstName = rep("Test", n), LastName = paste0("Contact-Create-", 1:n), My_External_Id__c=letters[1:n]) new_contacts_result <- sf_create(new_contacts, object_name="Contact") upserted_contacts <- tibble(FirstName = rep("Test", n), LastName = paste0("Contact-Upsert-", 1:n), My_External_Id__c=letters[1:n]) new_record <- tibble(FirstName = "Test", LastName = paste0("Contact-Upsert-", n+1), My_External_Id__c=letters[n+1]) upserted_contacts <- bind_rows(upserted_contacts, new_record) upserted_contacts_result1 <- sf_upsert(upserted_contacts, object_name="Contact", "My_External_Id__c") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.