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
asdfgasdfg 

DML on User Territory

Hi,
      I have a situation where i need to log in as two different users to test my code, Also with this I need that the both the users should belong to the same territory.
 
I am using run as method to log in as two different users, but was not able to associate these users to the territory.
Is there any way i can do this, failing to which i am forced to hard code the system users which i know is not the best practise to write any test methods.
 
Any idea of yours is much appriciated.
 
Thanks,
Sanjay