Why Soft-Deleted ObjectTerritory2Assocation (OT2A) Records Cannot be Retrieved and Restored in Salesforce (Veeva CRM)?
Salesforce confirmed this to be the expected behavior in Enterprise Territory Management (TM2.0). OT2A record restoration is not supported.
In the event an OT2A record is soft-deleted, the record will be still accessible with an SOQL query if the Include Archived and Deleted records checkbox is ticked by Salesforce Inspector, Workbench or Developer Console. The records cannot be purged or undeleted. They will remain in this state for 15 days. A Physical Deletion is required in order to permanently delete the record.
There are 3 stages of deletion. Soft delete is putting a record into the recycle bin. Hard delete is emptying the record from the recycle bin or deleting the record through API. Finally there is physical delete which permanently removes the record.
Hard deleted records can still be queried by users with the appropriate access when filtering on isDeleted = True. Once the records are physically deleted they will no longer return in queries. There is an automated PD sweeper process that runs PD batch jobs on each instance, and Salesforce Support can also initiate PDs per customer request.
OT2A records having the AssociationCause of Territory2AssignmentRule can be regenerated by running the Territory Utilities and SFDC Assignment Processes.
- The same scenario is applied to the Territory2, UserTerritory2Association other TM 2.0 related object and AccountShare records.
- CRM User Roles are completely hard deleted after a Delete action, they are not queriable.
CRM Help Documentation:
Send us your feedback: We are always looking for feedback to help improve our Knowledge Base! Please let us know if this article is helpful or provide feedback on how we can improve your experience by clicking here.