Problem Statement
The client needed the ‘Primary Territory’ field on User records in Veeva CRM to reflect the most recent territory assignment automatically. However, a key issue arose: when users were removed from all territory assignments, the field remained populated. This led to inaccurate data, which affected reporting and integrations downstream.
This problem impacted approximately 20–25 sales users, causing confusion and requiring manual intervention to correct the data—something the client was keen to eliminate.
Veeva’s standard features did not offer the flexibility the client required. Specifically, OOTB functionality does not:
Because of this, the data on the User record became unreliable, which in turn affected territory-based reporting and integrations.
Challenges Identified
Our Solution
To resolve these challenges, we implemented a custom Apex Trigger in Veeva CRM with the following capabilities:
Automatically clear the Primary Territory field when a user is no longer assigned to any territories.
Client Feedback
The client was very pleased with the outcome. They shared that the automation has eliminated confusion among users and improved the accuracy of reporting. Most importantly, it removed the burden of manually clearing outdated Primary Territory fields—especially helpful for the 20–25 users across sales roles who were most affected.
— By Shrishti
Get the latest news other tips