Arguments
- ids
vector
,matrix
,data.frame
, ortbl_df
; if not a vector, there must be a column called Id (case-insensitive) that can be passed in the request- api_type
character
; one of"REST"
,"SOAP"
,"Bulk 1.0"
, or"Bulk 2.0"
indicating which API to use when making the request.- control
list
; a list of parameters for controlling the behavior of the API call being used. For more information of what parameters are available look at the documentation forsf_control
.- ...
arguments passed to
sf_control
- verbose
logical
; an indicator of whether to print additional detail for each API call, which is useful for debugging. More specifically, when set toTRUE
the URL, header, and body will be printed for each request, along with additional diagnostic information where available.
Note
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.
References
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_undelete.htm
Examples
if (FALSE) { # \dontrun{
new_contact <- c(FirstName = "Test", LastName = "Contact")
new_records <- sf_create(new_contact, object_name = "Contact")
delete <- sf_delete(new_records$id[1],
AllOrNoneHeader = list(allOrNone = TRUE))
is_deleted <- sf_query(sprintf("SELECT Id, IsDeleted FROM Contact WHERE Id='%s'",
new_records$id[1]),
queryall = TRUE)
undelete <- sf_undelete(new_records$id[1])
is_not_deleted <- sf_query(sprintf("SELECT Id, IsDeleted FROM Contact WHERE Id='%s'",
new_records$id[1]))
} # }