sf_list_report_instances {salesforcer} | R Documentation |
List report instances
Description
Returns a list of instances for a report that you requested to be run asynchronously. Each item in the list is treated as a separate instance of the report run with metadata in that snapshot of time.
Usage
sf_list_report_instances(report_id, as_tbl = TRUE, verbose = FALSE)
Arguments
report_id |
|
as_tbl |
|
verbose |
|
Value
tbl_df
by default, or a list
depending on the value of
argument as_tbl
Salesforce Documentation
See Also
Other Report Instance functions:
sf_delete_report_instance()
,
sf_get_report_instance_results()
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, execute an async report
results <- sf_execute_report(this_report_id, async=TRUE)
# third, pull a list of async requests ("instances") usually meant for checking
# if a recently requested report has succeeded and the results can be retrieved
instance_list <- sf_list_report_instances(this_report_id)
instance_status <- instance_list[[which(instance_list$id == results$id), "status"]]
## End(Not run)