sf_delete_attachment | R Documentation |
This function is a wrapper around sf_delete
that accepts a list
of Ids and assumes that they are in the Attachment object and should be deleted.
This function is solely provided as a convenience and to provide the last
attachment function to parallel the CRUD functionality for all other records.
sf_delete_attachment( ids, object_name = c("Attachment"), api_type = c("SOAP", "REST", "Bulk 1.0", "Bulk 2.0"), ..., verbose = FALSE )
ids |
|
object_name |
|
api_type |
|
... |
arguments passed to |
verbose |
|
tbl_df
with details of the deleted records
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.
Other Attachment functions:
check_and_encode_files()
,
sf_create_attachment()
,
sf_download_attachment()
,
sf_update_attachment()
## Not run: # upload a PDF to a particular record as an Attachment file_path <- system.file("extdata", "data-wrangling-cheatsheet.pdf", package = "salesforcer") parent_record_id <- "0036A000002C6MmQAK" # replace with your own ParentId! attachment_details <- tibble(Body = file_path, ParentId = parent_record_id) create_result <- sf_create_attachment(attachment_details) # now delete the attachment # note that the function below is just running the following! # sf_delete(ids = create_result$id) sf_delete_attachment(ids = create_result$id) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.