Creates a copy of a custom, standard, or public report by sending a POST request to the Report List resource.
Arguments
- report_id
character
; the Salesforce Id assigned to a created analytics report. It will start with"00O"
.- name
character
; a user-specified name for the newly cloned report. If leftNULL
, then the new name will be the same name as the report being cloned appended with " = Copy" that is prefixed with a number if that name is not unique. It is highly recommended to provide a name, if possible.- 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.
Value
list
representing the newly cloned report with up to 4 properties
that describe the report:
- attributes
Report type along with the URL to retrieve common objects and joined metadata.
- reportMetadata
Unique identifiers for groupings and summaries.
- reportTypeMetadata
Fields in each section of a report type plus filter information for those fields.
- reportExtendedMetadata
Additional information about summaries and groupings.
See also
Other Report functions:
sf_create_report()
,
sf_delete_report()
,
sf_describe_report()
,
sf_describe_report_type()
,
sf_execute_report()
,
sf_list_report_fields()
,
sf_list_report_filter_operators()
,
sf_list_report_types()
,
sf_list_reports()
,
sf_query_report()
,
sf_run_report()
,
sf_update_report()
Examples
if (FALSE) { # \dontrun{
# only the 200 most recently viewed reports
most_recent_reports <- sf_report_list()
# all possible reports in your Org
all_reports <- sf_query("SELECT Id, Name FROM Report")
# id of the report to copy
this_report_id <- all_reports$Id[1]
# not providing a name appends " - Copy" to the name of the report being cloned
report_details <- sf_copy_report(this_report_id)
# example of providing new name to the copied report
report_details <- sf_copy_report(this_report_id, "My New Copy of Report ABC")
} # }