Overview:
A user records a Call against an Account. This Call does not update the value of field Last Activity Date on the Territory Specific Field (TSF) record of the Account. The field remains blank or it keeps its current value.
Root Cause:
A Call must fulfill the criteria specified in Apex Class VOD_ProcessTSF to update the value of field Last Activity Date on the TSF (Territory Field) record.
Apex Class VOD_ProcessTSF can be opened under Setup --> App Setup --> Develop --> Apex Classes.
The criteria is:
// locate TSF record types and account record type name
Map<String, TSF_vod__c> newTsfByTerr = new Map<String, TSF_vod__c>();
for ( AggregateResult results : [Select Account_vod__c, Territory_vod__c, Count(Id) totCalls, max(Call_Date_vod__c) mcalldate
From Call2_vod__c where Account_vod__c in :acctIds and Territory_vod__c in :terrInTsf
AND Status_vod__c != 'Planned_vod'
AND Call_Date_vod__c = THIS_YEAR
AND Call_Date_vod__c <= TODAY
GROUP BY Account_vod__c, Territory_vod__c ]) {
Solution:
Call needs fulfills the criteria in Apex Class VOD_ProcessTSF:
- The Call is not in Planned status (it is either Saved or Submitted).
- The Call Date is in the current year.
- The Call Date is not a future date.
Related Documentation:
CRM Help Documentation: Working with Territory Fields
Thank you