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
Bard09Bard09 

How to refer to an Account's Territor(ies) in Apex?

Hello,

 

Our organization has Territory Management enabled, and our Sales team has requested that each Account's owner = the assigned territory's Forecast Manager.

 

Unfortunately, I'm at a loss figuring out how to query an Account's Territory in Apex.  I know Opportunities have a TerritoryId field, but Accounts don't.  Is there any way I can refer to an Account's territory in Apex code?

 

MSuggestions would be MUCH appreciated.... thanks!