Is there a way to assign an account to a territory2 (Enterprise Territory Managment) in apex?

closed as too broad by Sebastian Kessel, Sergej Utko, Adrian Larson, Mohith Shrivastava, Boris Bachovski Apr 29 '16 at 0:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.