Newer Version Available

This content describes an older version of this product. View Latest

RTRReportResult Class

Use this class to execute the Trade Promotion Management Real Time Reporting (RTR) report and access the report data.

Namespace

CGCloud

Example

Here’s an example of how to use Apex to run the Trade Promotion Management Real Time Reporting reports.

This returns an instance of a RTRReportResult object after running the report. Use the methods provided by the RTRReportResult class to access the report data.

Filters can be specified for the report execution. The report filters specified match the filters defined in the RTR Report Metadata configuration (RTR Report Configuration SObject record). Depending on the filter type, the expected filter must have a specific structure or type.

singleselect
Here's an example of how the report's filter metadata looks:
Here's an example of how the filter using Apex looks:
multiselect
Here's an example of how the report's filter metadata looks:
Here's an example of how the filter using Apex looks:
periodmonth
Here's an example of how the report's filter metadata looks:
Here's an example of how the filter using Apex looks:

The filter must be represented by an object with the year, start, and total properties.

Note

periodweek
Here's an example of how the report's filter metadata looks:
Here's an example of how the filter using Apex looks:

The filter must be represented by an object with the year, start, and total properties.

Note

hidden
Here's an example of how the report's filter metadata looks:
Here's an example of how the filter using Apex looks:

The filter must be represented with a string.

Note

fixed
Here's an example of how the report's filter metadata looks:
Here's an example of how the filter using Apex looks:

The filter must be represented with a string.

Note

subaccount
Here's an example of how the report's filter metadata looks:
Here's an example of how the filter using Apex looks:

The filter must be represented with a List of strings.

Note

RTRReportResult Methods

The following are methods for RTRReportResult.

execute(String name, String salesOrg, Map<String, Object> filters)

Execute a RTR Report and retrieve all the Report data.

Signature

static RTRReportResult execute(String name, String salesOrg, Map<String, Object> filters)

Parameters

name
Type:String
The name of the RTR report configuration to execute.
salesOrg
Type:String
The Salesforce org name to execute the report on.
filters
Type:String
Report filters as defined in the RTR report metadata.

The filters attribute must align with the expected filters as defined in the RTR reporting configuration.

Return Value

Type:RTRReportResult

getComponent(String name)

Retrieve an instance of the Reporting UI component.

Signature

static RTRReportResult execute(String name, String salesOrg, Map<String, Object> filters)

Parameters

name
Type:String
The name of the reporting component as defined in the report metadata uimapping.

Return Value

Type:ReportComponent

  • For the Flatlist component, specify the response to RTRReportResult.FlatList
  • For the Scorecard component, specify the response to RTRReportResult.ScoreCard