Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

RTRReportResult.ScoreCard

This class represents an RTR Report UI ScoreCard component.

Namespace

The RTRReportResult.ScoreCard class extends RTRReportResult.ReportComponent.

The supported modifiers are global and virtual.

1cgcloud

Supported Methods

Table 1. RTRReportResult.ScoreCard Supported Methods
Method signature Description Version
Decimal getValue(String kpiName) Returns the value of the KPI parameter for the score card. If the KPI doesn’t exist, or isn’t part of the score card, it throws an exception.

kpiName: String. The name of the KPI to return the value from.

60.0

Example Implementation

After the report is executed, extract the ScoreCard data from the RTRReportResult object.

1// Extract the ScoreCard from the result
2// - The component name must match its 'uimapping' name
3// - The result must be casted to the correct type.
4cgcloud.RTRReportResult.ScoreCard scoreCard = (cgcloud.RTRReportResult.ScoreCard) reportResult.getComponent('ScoreCard');
5    
6// Extract KPI data. We assume the specified KPIs are in the configured ScoreCard
7Decimal kpiValue = scoreCard.getValue('ProPlanIncrVolume');
8
9system.debug('Value: ' + kpiValue);