Loading

Sales Territories: "Time Limit Exceeded" Error When Changing a Territory's Parent

Julkaisupäivä: Oct 21, 2026
Kuvaus

When you change the Parent Territory of a territory in Enterprise Territory Management, the save fails with the message "Time limit exceeded."

You may notice

  • The error appears when you edit a territory and select a new parent, or when you move it in the hierarchy.
  • The error repeats when you try again.
  • Deactivating the territory's assignment rules does not resolve it.

Why it happens

  • When you move a territory, Salesforce must recalculate the sharing structure for that territory and everything beneath it.
  • If many Accounts or Opportunities are associated with the territory, the recalculation can take longer than the platform allows, and the move fails.
  • There is no exact record count that guarantees success. The error can occur with fewer associated records than you might expect.
  • Data skew can also cause this error. Data skew means a single record, such as an Account, or a single owner has an unusually large number of related records. Salesforce generally treats more than 10,000 related records as skew. Moving a territory means recalculating sharing for those records, and a skewed record can make that take much longer.
  • Skew is a common contributor but not the only cause. A territory with many Accounts can move without error, while a smaller one with skewed Accounts fails.

How to confirm

  1. From Setup, open Territory Models and select the model that contains the territory.
  2. Count the account associations, for example with SELECT COUNT() FROM ObjectTerritory2Association WHERE Territory2Id = '<territory Id>'
  3. Check how many Opportunities belong to those Accounts.
  4. Check for data skew. Look for Accounts in the territory with a very large number of child records (Contacts, Opportunities, Cases, Activities). Also check whether a single user owns an unusually large number of the territory's Accounts.
  5. A large number of associations or any skewed records point to this issue. Skew can be present even when the association count looks reasonable, so check for it either way.
Ratkaisu
  1. Create a new territory under the parent you want. Don't use the Clone command.
  2. Configure the new territory with the same access levels as the original.
  3. Recreate the assignment rules, or copy them from the original territory.
  4. Run the rules at the territory level, not at the model level. If the original territory has manually assigned Accounts, load them to the new territory.
  5. Remove the old assignments from the original territory.
  6. Delete the original territory.

If you found skewed Accounts, review them before reassigning. They will cause the same problem under the new parent.

Option 2: Defer sharing calculations first

  1. From Setup, suspend sharing calculations.
  2. Move the territory to the new parent.
  3. Resume sharing calculations.

This may allow the move to complete, but it is not guaranteed to work. If the error continues, use Option 1.

Best practices

  • Plan large restructures in an inactive model before activating them.
  • Avoid placing very large numbers of Accounts and Opportunities under a single territory.
  • Spread ownership of Accounts and their child records across users, so no single record or owner carries more than about 10,000 related records.
  • Look for skewed Accounts before a large hierarchy change, and clean them up first. Don't remove Accounts from a territory if doing so would break your territory structure. Option 1 is a safer route.
  • Make large hierarchy changes during off-peak hours.
Knowledge-artikkelin numero

005462374

 
Ladataan
Salesforce Help | Article