Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sf_list_report_instances

List report instances


Description

Experimental lifecycle

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

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

as_tbl

logical; an indicator of whether to convert the parsed JSON into a tbl_df.

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

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)

salesforcer

An Implementation of 'Salesforce' APIs Using Tidy Principles

v0.2.2
MIT + file LICENSE
Authors
Steven M. Mortimer [aut, cre], Takekatsu Hiramura [ctb], Jennifer Bryan [ctb, cph], Joanna Zhao [ctb, cph]
Initial release
2020-09-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.