+ 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