My org doesn`t have Territory Settings in setup. What is reason? Profile – System administrator, Organization Edition – Enterprise Edition
[SalesForce] Why is Territory management not available
Related Solutions
The primary difference between the two is the question of "how many"?
In the role hierarchy, you are allowed one role as a user. So if I am in a sales hierarchy where it is only regional (East, Central, West, for instance), no problem.
But what if I also have an industry vertical, and I need to be in both East, and the Manufacturing vertical?
This is the intended purpose of territories. In territories, I can be given record access based on two or more factors. I can be in one territory that identifies my geographical location, and the industry vertical and Account size (and as many other factors, potentially as I need).
But I've never implemented it. In fact few have implemented the new Territory Management features as it is a recent addition and replaces the old ugly Territory Management feature. So don't take my word for it, download the guide.
As to why your custom objects don't seem to be playing ball, that is explained in the guide where it states:
Territory management only affects accounts and the standard objects that have a master-detail relationship to accounts. For example, opportunities are included in territory management but leads are not.
So for record-level permissions (also sometimes referred to as the Sharing Model, record access, record visibility) for custom objects, you must use roles and the role hierarchy.
From Territory Management: running territory assignment rules on Account edit:
As of version 21 of the Force.com Apex Code Developer's Guide, there is not a way to run territory assignment rules through Apex: "assignmentRuleHeader method - The database.DMLOptions object supports assignment rules for cases and leads, but not for accounts or territory management."
The only option as of API version 21 is to use the Web Services API. See AssignmentRuleHeader in the Web Services API Developer Guide for more information:
"AssignmentRuleHeader – useDefaultRule - If true for a Case or Lead, uses the default (active) assignment rule for a Case or Lead. If specified, do not specify an assignmentRuleId. If true for an Account, all territory assignment rules are applied, and if false, no territory assignment rules are applied."
Heres the relevant trailhead.
Looks like both the SOAP API and the REST API expose the field you need.
Best Answer
Territory management is not enabled by default in Salesforce. To request territory management for your organization, contact salesforce.com. If you have already done this step and you are seeing this feature missing recently. The following might be the cause
Migrating to the new Collaborative Forecasting requires disabling Territory Management 1.0
As per this documentation, the Customizable Forecasting was retired for all customers as of Summer ’20. Users can’t access the Customizable Forecasting feature and its underlying data. Salesforce encourages you to migrate to Collaborative Forecasts. The documentation also quotes "If you agree to the steps above, please contact support to enable permission to allow you to deactivate Customizable Forecasting and/or Territory Management 1.0"
I recommend engaging support if you have any specific questions