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 

DefaultTerritoryAccountAccess field is missing from Organization

This behavior is occurring in a Salesforce Developer Edition environment.

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.

Here is the error message:

"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.
VinayVinay (Salesforce Developers) 
HI Mateo,

This might be due to retirement of original territory management module and recommend to migrate users to Enterprise Territory Management.  Check below reference for more details.

https://help.salesforce.com/s/articleView?id=000383474&type=1

Please mark as Best Answer if above information was helpful.

Thanks,