Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [territory]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

Enterprise Territory Management

Within my region (Region A), there are multiple countries (B) and numerous cities (C) within each country. I'm seeking a method to establish a region as a territory with sub-territories for countries, ...
Virgo27's user avatar
  • 19
1 vote
0 answers
26 views

Impact of Enabling Enterprise Territory Management in Org

I've been exploring Enterprise Territory Management, which I've successfully enabled in my organization. I've configured territory settings, created models, types, and territories, and even set up an ...
Virgo27's user avatar
  • 19
1 vote
1 answer
115 views

I need to SOQL query UserTerritory2Association based on the Account website

I need to select the UserTerritory2Association ID looking for the Territory ID associated with the account, based on the Account website. So far I tried this: SELECT Id FROM ...
DavidV's user avatar
  • 11
0 votes
1 answer
140 views

What permission a user should have in order to change the territory in Opportunity manually?

I have a business user who is getting Read/Write access to opportunity via sharing rule, but he is not able to change the Territory value in Opportunity. User is getting the error - "insufficient ...
Ashik Shetty's user avatar
0 votes
1 answer
540 views

Can we create lookup field to territory on Account or custom objects?

I am trying to create a lookup to Territory on the Account object. But while creating a lookup field, I am not able to see the Territory object in "Related To" dropdown box(screenshot given ...
Arvind's user avatar
  • 15
0 votes
0 answers
168 views

Are Salesforce Account Territories Available in Test Class without seeAllData = true

Are territories visible in test class without SeeAllDate=true ?? I have an account created and then I try to query the territory, but it is coming as blank. List<ObjectTerritory2Association> ...
Superwoman's user avatar
0 votes
2 answers
286 views

Checking if Territory has Users

Is there a way to check if a territory has a user assigned? I tried using UserTerritory2Associations to query by a TerritoryId and log 'doesnt exist' or 'exist' if the result is null or not. But it is ...
Vicky's user avatar
  • 1
0 votes
0 answers
1k views

Updating Account owner based on Territory2 and Account relationship

This is my Pseudocode Trigger on Territory2 before Update If IsChanged (UserTerritory2Association.User) Get AccountID of the Account assigned to the Territory from ObjectTerritory2Association Get ...
GroundToCloud's user avatar
0 votes
1 answer
725 views

How to mass remove manually assigned accounts in Territory Management?

Is there a way to mass remove manually assigned Accounts in a Territory Model ? Note, currently there no assignment rules in the Territory model. This is a sandbox.
GroundToCloud's user avatar
0 votes
1 answer
670 views

How to mass delete manually assigned accounts in territory management?

as you can see in the picture, the task is simple, but instead of going one by one and manually deleting each manually assigned accounts in territory management, how would one go about deleting each ...
VanceSOQL's user avatar
  • 103
3 votes
1 answer
171 views

Packaging trigger on UserTerritory2Association object (part of Enterprise Territory Management 2.0)

Our managed package (1gp) has a dependency from Enterprise Territory Management (ETM 2.0). And we've created a trigger on UserTerritory2Association object to track moments when user is assigned to a ...
wesaw's user avatar
  • 3,080
2 votes
1 answer
125 views

Can Territory be an owner of a record?

While listening to video "Sharing and Visibility With Salesforce" from Salesforce Apex Hours youtube channel at time 20:14, I have seen a slide where it is stated that a Territory can be an ...
p-p's user avatar
  • 174
0 votes
1 answer
832 views

How to get a list of accounts that are not assigned to any territory?

I found out that we have accounts without any territory assigned. How can I get a list of all accounts with that problem? It is not possible to create a roll-up summary field, as the relationship is ...
Sander de Jong's user avatar
0 votes
1 answer
152 views

How to give all Sales Reps read-only on all New Opportunities, but restrict them from changing Opp Owner

Sales Rep Users need the ability to see (Read only) all New Opportunities no matter what territory they are in, no matter who is the Owner. We set this up successfully by creating a Sharing rule where ...
Ryan McNeely's user avatar
0 votes
1 answer
581 views

AccountShare UserOrGroup.Type returning weird results

I was wondering if someone could explain this to me. I am currently working in an org with Territory Management (1.0) enabled and I am trying running queries but getting weird results. When I run a ...
Bryan Anderson's user avatar
0 votes
1 answer
404 views

Errors when creating unlocked package version with Apex Territory2 dependencies

Creating an unlocked package version: sfdx force:package:version:create -p MyPackage --apiversion 48.0 -d force-app -x --wait 10 with classes that depent on Territory2 objects returns the following ...
Frank's user avatar
  • 167
1 vote
1 answer
761 views

Enterprise Territory Management without Sales Cloud User License

Is it possible to setup Enterprise Territory Management without Sales Cloud User licenses effectively? What are the downsides? We currently only have Service Cloud User Licenses but have enabled ...
ebar's user avatar
  • 447
1 vote
0 answers
315 views

Why does my user territory assignment show inactive in UI, but still show Active in the backend via SOQL?

We have Apex code that depends on the UserTerritory2Association.IsActive flag. For some reason, one of our user territory assignment is inactivate ('IsActve = false') but on the backend, the field is ...
Swisher Sweet's user avatar
3 votes
0 answers
35 views

Remove dependency of Territory object from already released managed package

Salesforce has announced retiring the support for original territory management https://help.salesforce.com/articleView?id=000273181&type=1 and we have our managed package using the standard ...
user360's user avatar
  • 445
4 votes
1 answer
83 views

Territory2Id no longer visible to partner users?

Since Spring 19 release got pushed to our sandboxes, we've had a bunch of problems with the community we're working on. I've been debugging and seem to have isolated this issue. If I enter the ...
api-testuser45690's user avatar
0 votes
1 answer
284 views

Salesforce Territories

I'm brand spanking new to Salesforce. Helping a friend with some of her accounts and I'm learning as I go. She wants me to find a way to make her assignment rules for her territory fields work. ...
Kelly Rana's user avatar
4 votes
0 answers
1k views

If you assign a territory to an Opportunity manually, why does the parent of that territory get access, instead of the territory it self?

Let's assume the following scenario: I have a sales organization with multiple regions. Every region is represented in a territory using Territory Management. The accounts are assigned to those ...
Folkert's user avatar
  • 2,712
3 votes
1 answer
4k views

Territory Management: run Territory Account Assignment Rules from Apex

We are using Territory Management in our org and the challenge is to trigger processing of standard account assignment rules from Apex code. Currently we are doing this manually (from Setup -> ...
wesaw's user avatar
  • 3,080
0 votes
1 answer
2k views

How to traverse territories in Salesforce using SOQL query

I have a field on contact object called 'Region' (Text formula field) whose end value would be in the range of 1-5. On the other hand, I have a territory model setup in my Salesforce instance. There ...
Student's user avatar
  • 565
1 vote
1 answer
659 views

How do I mass delete Territory2 records in Apex?

I have a list of Territory2 records. All of them are from the deepest level of my territory hierarchy. When I attempt to save some apex to Salesforce that would delete this list of records, I'm ...
SF1Dev's user avatar
  • 775
0 votes
2 answers
34 views

Error in Territory Name

I need to get the Name of the Territory to assign it to a field, but when I try it, it generates an error. this is my code: List<UserTerritory> myList = [ select Id, UserId, TerritoryId ...
Daniel A Martins V's user avatar
0 votes
1 answer
1k views

I need a query to take the name of the territory to which a user belongs [duplicate]

I need a query to take the name of the territory to which a user belongs I try with this UserTerritory userT = [SELECT Id, Terrotory.Name FROM UserTerritory ...
Daniel's user avatar
  • 1
1 vote
1 answer
385 views

How to Restrict user to have more than one territory?

I want to show an error message when admin tries to associate the user of a particular profile with more than one territory. The user of this profile should be assigned to one territory only. If the ...
Saurabh's user avatar
  • 13
1 vote
1 answer
948 views

AccountShare history after delete - how to determine who removed manual sharing?

At present, my organization using the territories(tm 1.0) for sharing accounts. If user want to manual share account to specific territory he can do that in UI. But we need to feature to account ...
Adamo's user avatar
  • 381
0 votes
1 answer
368 views

Account Territory is not getting automatically assigned when a new account is created

When a user creates new account territory assignment rule doesn't work but when we manually run assignment rule/ edit the account then it assigns territory.
user46558's user avatar
0 votes
1 answer
1k views

Territories not auto-assigned to Opportunities upon creation

Situation : When I create an account, it auto-populates the territories in account -> works as expected by using "Account Assignment Rules Defined in This Territory" When I create an opportunity ...
compski's user avatar
  • 1,352
0 votes
1 answer
50 views

Case notification issue

I have one requirement where I have to send email notification to account territory team of specific region (example West-WE) whenever case is opened for particular account of that region. Here only ...
Dilip Kulkarni's user avatar
0 votes
1 answer
707 views

Is there a way to override a override a Territory Assignment Rule with a manual rule.

I want to use the Territory Assignment Rules for 90% of our prospects. On the other 10%, I may need to override the territory manually. It is important to note - I only have one territory per ...
Tom Lop's user avatar
0 votes
0 answers
178 views

Select option value change effect in SOQL

I have a specific case where a particular ID value is in constructor. Hence, it runs only during the page loads. Now on VF page a select option field value change makes the ID value to change. But the ...
Testing_SFDC's user avatar
  • 2,940
-1 votes
1 answer
2k views

Assign values to map

I have below code where i am trying to assign values to a map. Code List<territory> obj = database.query(soql1); system.debug('obj@@assign'+obj); Map<Id, territory> ...
Testing_SFDC's user avatar
  • 2,940
0 votes
1 answer
3k views

need a one query which will fetch the users from territory with (Custom Field on User User_Type__C is ='manager'

Requirment :- I need to fetch the assigned user to the territory for any account. I have one account with territory and in that territory assigned user count is 5 and there is one user with UserType='...
sandy's user avatar
  • 37
4 votes
0 answers
1k views

Triggering on Account territory changes (ObjectTerritory2Association)?

Has anyone figured out a reasonable solution to detecting in real-time when an Account's Territory or Territories (stored in ObjectTerritory2Association) has been changed? We aren't allowed to create ...
Jamie G's user avatar
  • 298
1 vote
1 answer
2k views

Assigning user to a territory

I am working on a scenario where a user fills a form containing the field 'Area Code'. Based on the value of Area Code , the user has to be assigned to a territory(by matching the Area Code with a ...
starhunter's user avatar
1 vote
1 answer
615 views

Territory2. How to delete all child territories when delete parent?

I created a Territory Hierarchy like: Europe France | Poland Paris Lyon Nice | Warsaw Krakow When I delete Poland I want to automatically delete all child ...
Leroy's user avatar
  • 67
2 votes
1 answer
3k views

Shouldn't accounts automatically be assigned to territories when created/edited if rules match?

We have been using Territory Management 2.0 for about a year now. I was under the impression that when accounts are created or subsequently edited to meet the territory assignment rule criteria, the ...
Swisher Sweet's user avatar
4 votes
1 answer
4k views

What objects are covered by Enterprise Territory Management?

I am trying to understand which objects can be shared using Enterprise Territory Management. Finding this has been difficult because most information that comes up in searches is related to the old ...
B Sowers's user avatar
1 vote
0 answers
580 views

Enterprise Territory Management: how to remove territory assigned by rule in account

I used Enterprise Territory Management. For the territory model, I set the rules for each territory by geography. For example: - Global Sales -- San Fransisco (Account Billing State: San Fransisco) ...
Silvia's user avatar
  • 11
1 vote
3 answers
4k views

how to extract accounts under a particular territory in salesforce?

how to extract accounts under a particular territory in salesforce? can some one provide me the query please if possible. Is there a way to do it using vlookup and dataloader?
rao's user avatar
  • 11
2 votes
2 answers
701 views

How to delete UserTerritory records using api(SOAP etc.) with Apex

The UserTerritory record does not support direct DML with Apex, as it states in the docs. I am trying to delete using Partner SOAP API but unable to delete the records. My code is below : HTTP h = ...
Ghanshyam Saini's user avatar
0 votes
1 answer
432 views

Understanding Territory 2.0

Please help in understanding below points I am using Territory 2.0 and I can use SOQL but not SOSL. Why? Below 2 URL is conflicting in using DML operation. Please help in understanding. Please note ...
Arun SFDC's user avatar
  • 1,458
1 vote
0 answers
34 views

Report with a wrong Territory View

I created a custom Report Type "O-p-p". A report X with the "O-p-p" custom Report Type. When I build the report I cannot see any row, because it is set with a certain territory point of view in the ...
Andrea Ianni's user avatar
  • 1,161
1 vote
0 answers
83 views

Budgets for Territory in Salesforce

We are testing out Territory Management for our organization. One of the requirements is to assign monthly & yearly budgets for the territories. I looked at using a Territory Budget Custom object ...
Gangha's user avatar
  • 11
0 votes
1 answer
221 views

what is the use of territory object on opportunity

Can anyone help me to know what is the use of territory object on opportunity with a example. Please provide me some example and how there 2 objects are related to each other.
Anu's user avatar
  • 3,857
1 vote
1 answer
156 views

Limit custom object to user territory

I have a custom object and custom tab for it. It has Lookup relationship to Account. Currently user can view all custom object records. But I want to limit access to custom object using user's ...
WJR's user avatar
  • 191
0 votes
1 answer
685 views

But why? - Enterprise Territory Management cannot be enabled in existing organizations that have Customizable Forecasting enabled

Is there a deep underlying logic? They say, 1. Standard Fiscal year goes with Standard forecasting 2. Custom Fiscal year with customizable forecasting and with Territory mgmt 1.0 3. Custom Fiscal ...
human's user avatar
  • 655