sf_delete | R Documentation |
Deletes one or more records from your organization’s data.
sf_delete( ids, object_name = NULL, api_type = c("REST", "SOAP", "Bulk 1.0", "Bulk 2.0"), guess_types = TRUE, control = list(...), ..., all_or_none = deprecated(), verbose = FALSE )
ids |
|
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 <- 3 new_contacts <- tibble(FirstName = rep("Test", n), LastName = paste0("Contact", 1:n)) new_records <- sf_create(new_contacts, object_name="Contact") deleted_first <- sf_delete(new_records$id[1], object_name = "Contact") # add the control to do an "All or None" deletion of the remaining records deleted_rest <- sf_delete(new_records$id[2:3], object_name = "Contact", AllOrNoneHeader = list(allOrNone = TRUE)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.