sf_delete_report_instance: Delete a report instance

View source: R/analytics-report.R

sf_delete_report_instanceR Documentation

Delete a report instance

Description

[Experimental]

If the given report instance has a status of Success or Error, delete the report instance.

Usage

sf_delete_report_instance(report_id, report_instance_id, verbose = FALSE)

Arguments

report_id

character; the Salesforce Id assigned to a created analytics report. It will start with "00O".

report_instance_id

character; the Salesforce Id assigned to a created analytics report instance (an asynchronous run). It will start with "0LG".

verbose

logical; an indicator of whether to print additional detail for each API call, which is useful for debugging. More specifically, when set to TRUE the URL, header, and body will be printed for each request, along with additional diagnostic information where available.

Value

logical indicating whether the report instance was deleted. This function will return TRUE if successful in deleting the report instance.

Salesforce Documentation

See Also

Other Report Instance functions: sf_get_report_instance_results(), sf_list_report_instances()

Examples

## Not run: 
# first, get the Id of a report in your Org
all_reports <- sf_query("SELECT Id, Name FROM Report")
this_report_id <- all_reports$Id[1]

# second, ensure that report has been executed at least once asynchronously
results <- sf_execute_report(this_report_id, async=TRUE)

# check if that report has succeeded, if so (or if it errored), then delete
instance_list <- sf_list_report_instances(this_report_id)
instance_status <- instance_list[[which(instance_list$id == results$id), "status"]]

## End(Not run)

salesforcer documentation built on March 18, 2022, 6:26 p.m.