Overview:
When querying the Sent_Email_vod__c object, it is noticed that the Territory_vod__c field is null on one or more Sent Email records.
Root Cause:
Territory_vod__c is not populated on Sent_Email_vod__c records if there is no Territory match between the sending User and the Account the email was sent to.
Solution:
First, ensure the User has Read Field Level Security (FLS) to the Territory_vod__c field on the Sent_Email_vod object.
Second, it is important to understand how the Sent_Email_vod__c.Territory_vod__c field is updated:
- This field references the sending User's Territory. If the User sending the email belongs to multiple Territories, this field references the first common territory between the User and the recipient Account.
- If there are no matches between the User's Territories and the Account's Territories, the Territory_vod__c field is not populated on the Sent Email record.
Related Documentation:
CRM Online Help: Tracking Approved Email Activity