You need to sign in to do that
Don't have an account?
Test Data for User Territory Hierarchy
Hi,
How can we create test data for User Territory Hierarchy. Since UserTerritory object does not allow DML operation and we can't assign Territory to the User. Do we need to create data (User, Territory & UserTerriotry) manually before running test class ??
Thanks.
How can we create test data for User Territory Hierarchy. Since UserTerritory object does not allow DML operation and we can't assign Territory to the User. Do we need to create data (User, Territory & UserTerriotry) manually before running test class ??
Thanks.
Thanks for your reply.
Territory Management is enabled but how can we insert data in UserTerritory as DML operations are not allowed on UserTerritory.
Also, Using seeAllData = true is not good practice. So is their alternative approach to insert records in UserTerriotry object OR we need to create required User Territory Hierarchy before running test classes ??
Thanks