Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're using Territory Management. We want to have the name of the Parent Territory available on the Opportunity.

Parent Territory is a standard field on the Territory sObject. However, it does not appear to be available in the "insert" feature of the formula creator.

I've attempted to access it from a formula on Opportunity and I attempted to access it from a custom formula from the Territory Object itself.

Is there a way to get the Parent territory exposed via a formula? Do I have to resort to a Trigger?

share|improve this question

Here's one solution:

  1. Add a small VF page to your standard Opportunity layout
  2. Have the VF page use a VF controller
  3. VF controller can traverse the territory-parent territory relationship using SOQL. You also might also be able to do this with merge fields and skip the controller in #2 altogether - I didn't test this.


  1. You can extend and display more territory data in the mini VF component on the Opportunity detail page
  2. As territory hierarchy changes, Opportunity detail page, when refreshed, reflects new hierarchy


  1. You can't report on the field as it is generated by VF only. Same with List Views

The trigger solution is not the right (or complete) answer as it won't be sensitive to the territory hierarchy changing. Instead, you'll need to have a scheduled job that updates the Opportunity reflecting the current hierarchy every <you decide how often .. daily, hourly>.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.