Before TaroWorks 7.4, Performance Indicators could only be set up on an Object that was a child of the Contact Object. Starting TaroWorks 7.4, you can set Performance Indicators on any Object.
The purpose of this step is to migrate the Contact references for existing records so that the existing Performance Indicator counts are visible once you upgrade to TaroWorks 7.4.
- Go to Setup > Developer Console.
- Click Debug > Open Execute Anonymous Window.
- Copy and Paste the following:
List<gfsurveys__PerformanceTarget__c> targets =
new
List<gfsurveys__PerformanceTarget__c>();
for
(gfsurveys__PerformanceTarget__c pt : [SELECT Id, gfsurveys__Status__c, gfsurveys__TrackedSObjectContactLookupFieldName__c, Name FROM gfsurveys__PerformanceTarget__c WHERE (gfsurveys__Status__c =
'Active'
OR gfsurveys__Status__c =
'Inactive'
) AND gfsurveys__TrackedSObjectContactLookupFieldName__c LIKE
'%ReportsToId%'
]){
String fieldName = pt.gfsurveys__TrackedSObjectContactLookupFieldName__c;
pt.gfsurveys__TrackedSObjectContactLookupFieldName__c = fieldName.replace(
'ReportsToId'
,
'OwnerId'
);
targets.add(pt);
}
if
(targets.size() >
0
){
update targets;
}
- Click Execute.
Conclusion
Congratulations you've updated the existing performance indicators. Please continue to 04. Update Existing Performance Targets.
Comments
0 comments
Please sign in to leave a comment.