• Mateo Davis
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
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.
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.
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.