Timeout when deleting a Team Member or Distributor


Deleting team members or distributors taking a long time and / or hitting a timeout error. 


Some customers who are generating large volumes of distribution logs may experience slow performance and timeouts when attempting to delete a Team Member or Distributor. The timeout may also cause Distribution Engine to abort due to records being locked while the Team Member deletion is being completed. The issue is caused by a high number of distribution log records in a "hard deleted" state not being cleared from the database by Salesforce. Although the records are deleted they still exist within the Salesforce database and cause performance problems because they are still referenced. 

Salesforce has 3 levels of deletion for any record in the system (Reference: "Recover or Restore lost or deleted records or data"):

  • Stage 1: Soft deleted - Deleted but still in Recycle Bin
  • Stage 2: Hard deleted - Emptied from the Recycle Bin (cannot be recovered from the recycle bin but can be accessed and exported using API / DataLoader)
  • Stage 3: Physically deleted - Permanently deleted from the database. This step should be automatic and can only be done by Salesforce.


Salesforce has an automated job to physically delete all hard deleted records, it should run weekly but is not guaranteed. During certain release windows / busy periods it may not run and when it does run it is not guaranteed to finish cleaning up all records needing physical deletion. The result being that hard deleted data can build up in a customer org causing performance issues.


Open a support case with Salesforce and request that they "run the physical delete process on the n2de__Distribution_log__c and the n2de__Distributor_rr_sa__c objects."  This request will clear the hard deleted logs from your Salesforce organiziation which should resolve the issue.

How did we do?

Records Stuck / Not Being Assigned