RTRReportResult

The RTRReportResult Apex class provides methods to access and process RTR reports.

The supported modifiers are global, virtual, and with sharing.

Method signatureDescriptionVersion
static RTRReportResult execute(String name, String salesOrg, Map<String, Object> filters)Executes an RTR report and retrieves all the report data.
  • name: String. The internal name of the RTR report configuration to execute.
  • salesOrg: String. The sales org name to execute the report.
  • filters: Map<String, Object>. The report filters as defined in the RTR report metadata. For a list of possible filter types, see Report Execution Filter Types and Limits.
60.0
static void setMock(List<Object> results)Sets up mock results for unit test execution.
results: List<Object>. A list of object instances of type:
  • RTRReportResult
  • RTRReportResult.MockException

When running unit tests, the system returns the mock value of the results in the order in which they were specified. For example, for the third execute call, the third item on the list is returned.
If the mock result is an instance of RTRReportResult.MockException, the method throws CGCloudException.
60.0
ReportComponent getComponent(String name)Retrieves an instance of the reporting UI component.
name: String. The reporting component name as defined in theuimapping report metadata.
To access the information inside the report, cast the result of this method to the correct type. For example, if the component is Flatlist, cast the return to RTRReportResult.Flatlist.
This method throws an exception if the component doesn’t exist in the report, or it’s not from a valid type.
60.0
String getSalesOrg()Returns the sales org used for the RTR report execution.60.0
String getReportName()Returns the report name used for the RTR report execution.60.0
Map<String, Object> getFilters()Returns the filters used for the RTR report execution.60.0

Here’s an example implementation of the execute method.

Here’s an example implementation of how to use the setMock method to unit test multiple execute calls.