sf_create | R Documentation |
Adds one or more new records to your organization’s data.
sf_create( input_data, object_name, 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 |
|
api_type |
|
guess_types |
|
control |
|
... |
arguments passed to |
all_or_none |
|
verbose |
|
tbl_df
of records with success indicator
Because the SOAP and REST calls chunk data into batches of 200 records the AllOrNoneHeader will only apply to the success or failure of every batch of records and not all records submitted to the function.
## Not run: n <- 2 new_contacts <- tibble(FirstName = rep("Test", n), LastName = paste0("Contact", 1:n)) new_recs1 <- sf_create(new_contacts, object_name = "Contact") # add control to allow the creation of records that violate a duplicate rules new_recs2 <- sf_create(new_contacts, object_name = "Contact", DuplicateRuleHeader=list(allowSave=TRUE, includeRecordDetails=FALSE, runAsCurrentUser=TRUE)) # example using the Bulk 1.0 API to insert records new_recs3 <- sf_create(new_contacts, object_name = "Contact", api_type = "Bulk 1.0") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.