RTRReportResult.ScoreCard

This class represents an RTR Report UI ScoreCard component.

The RTRReportResult.ScoreCard class extends RTRReportResult.ReportComponent.

The supported modifiers are global and virtual.

Namespace 

1cgcloud

Supported Methods 

Method signatureDescriptionVersion
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);