sf_update_report {salesforcer} | R Documentation |
Update a report
Description
Save changes to a report by sending a PATCH request to the Report resource. Note that saving a report deletes any running async report jobs because they might be obsolete based on the updates.
Usage
sf_update_report(report_id, report_metadata, verbose = FALSE)
Arguments
report_id |
|
report_metadata |
|
verbose |
|
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.
Salesforce Documentation
See Also
Other Report functions:
sf_copy_report()
,
sf_create_report()
,
sf_delete_report()
,
sf_describe_report_type()
,
sf_describe_report()
,
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()
Examples
## Not run:
# first, grab all possible reports in your Org
all_reports <- sf_query("SELECT Id, Name FROM Report")
# second, get the id of the report to update
this_report_id <- all_reports$Id[1]
my_updated_report <- sf_update_report(this_report_id,
report_metadata =
list(reportMetadata =
list(name = "Updated Report Name!")))
# alternatively, pull down its metadata and update the name
report_details <- sf_describe_report(this_report_id)
report_details$reportMetadata$name <- paste0(report_details$reportMetadata$name,
" - UPDATED")
# fourth, update the report by passing the metadata
my_updated_report <- sf_update_report(this_report_id,
report_metadata = report_details)
## End(Not run)