function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mateo DavisMateo Davis 

No DefaultTerritoryAccountAccess field on Organization

Reading through the documentation (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_organization.htm), the Organization object should have a field DefaultTerritoryAccountAccess. However when I query /services/data/v46.0/sobjects/Organization/describe, DefaultTerritoryAccountAccess isn't in the returned fields, and when I include it in a soql query, I get the below error:

"errorCode":"INVALID_FIELD","error_description":"","message":"\nDefaultLeadAccess, DefaultOpportunityAccess, DefaultTerritoryAccountAccess FROM\n ^\nERROR at Row:1:Column:125\nNo such column 'DefaultTerritoryAccountAccess' on entity 'Organization'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
Best Answer chosen by Mateo Davis
Mateo DavisMateo Davis
It turns out that the field DefaultTerritoryAccountAccess is affiliated with version 1 of territories, and will not exist if you're using Territories v2.

While I don't know a way to find the Default Territory Account Access value in Territories v2, all this value does is pre-populate the account access for any newly created territories. Therefore, if your goal is to find what the settings are on your territories, the field you care about is AccountAccessLevel on the Territory2 object

All Answers

Shri RajShri Raj
The DefaultTerritoryAccountAccess field is only available if you have Territory Management enabled in your Salesforce organization. It's possible that it's not showing up in the describe call because Territory Management is not enabled.
You can check if Territory Management is enabled in your organization by going to Setup > Company Settings and searching for "Territory Management". If it is not enabled, you will need to enable it in order to use the DefaultTerritoryAccountAccess field.
If Territory Management is enabled and you are still not seeing the DefaultTerritoryAccountAccess field in the describe call, it's possible that there is an issue with your API version. Make sure that you are using a version of the API that supports Territory Management and that you have the appropriate permissions to access the field.
SubratSubrat (Salesforce Developers) 
Hello ,

Territory Management is not activated by default in Salesforce. To enable the Territory Management feature, follow these steps:
1.Go to Setup.
2.In the Quick Find box, enter territories then select Territory Settings. 
3.Click Enable Enterprise Territory Management.
4.To start out, select the most restrictive access levels, then click Save. 

You can then change the default user access levels for accounts, contacts, and opportunities. You can also configure how opportunity territory assignments work.

--> https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_territory.htm

Thank you.
Mateo DavisMateo Davis
I have verified that I have Territory Management activated. In territory settings I see a banner saying "Enterprise Territory Management has been successfully enabled for your organization. From this settings page you can configure access rules for accounts and opportunities associated with territories."

In addition, I can successfully retrieve Territory2, Territory2Model, Territory2Type, UserTerritory2Association, and ObjectTerritory2Association objects via soql, but there is no DefaultTerritoryAccountAccess field on Organization.

This behavior is occurring in a Salesforce Developer Edition environment.
Mateo DavisMateo Davis
It turns out that the field DefaultTerritoryAccountAccess is affiliated with version 1 of territories, and will not exist if you're using Territories v2.

While I don't know a way to find the Default Territory Account Access value in Territories v2, all this value does is pre-populate the account access for any newly created territories. Therefore, if your goal is to find what the settings are on your territories, the field you care about is AccountAccessLevel on the Territory2 object
This was selected as the best answer