You need to sign in to do that
Don't have an account?
Puneeth Kumar
sObject type 'UserTerritory2Association' is not supported.
Hi All,
I got piece of code in my test class which uses objects belonging to Territory management 2.0, was unable to initialize a variable of type 'UserTerritory2Association' . I see there are diference in objects from TM --> TM 2.0, acoordingly I have changed my code but still the same error persists. For refernece attaching screenshot as well as error. Please advice.
I have the error in line 75
Error: sObject type 'UserTerritory2Association' is not supported.
I got piece of code in my test class which uses objects belonging to Territory management 2.0, was unable to initialize a variable of type 'UserTerritory2Association' . I see there are diference in objects from TM --> TM 2.0, acoordingly I have changed my code but still the same error persists. For refernece attaching screenshot as well as error. Please advice.
I have the error in line 75
Error: sObject type 'UserTerritory2Association' is not supported.
Enterprise Territory Manage uses different objects.
Territory2
UserTerritory2Association
ObjectTerritory2Association
Territory2Model
RuleTerritory2Association
Kindly modify your code as below: For more information please refer to the below link:
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_userterritory2association.htm
Kindly mark this as solved if it helps you.
Best Regards,
Nagendra.P
All Answers
Enterprise Territory Manage uses different objects.
Territory2
UserTerritory2Association
ObjectTerritory2Association
Territory2Model
RuleTerritory2Association
Kindly modify your code as below: For more information please refer to the below link:
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_userterritory2association.htm
Kindly mark this as solved if it helps you.
Best Regards,
Nagendra.P