Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [territory-management]

The tag has no usage guidance.

2
votes
0answers
20 views

Is there a way to specify an API version of a call to @RestResource?

I would like to specify an API version when I call a @RestResource via an API. Is that possible? Why For some reason, our Spring '19 sandbox is having a weird issue, and I'd like to fix this before ...
1
vote
1answer
73 views

Enterprise Territory Management: Using Apex/SOQL get all accounts in UserId's territories

I am trying to find a solution to getting all accounts in a users territory or territories with soql. I am not finding much info about it anywhere with Enterprise Territory Management. EDIT: What I ...
1
vote
0answers
21 views

OpportunityTerritory2AssignmentFilter with more than 1000 qualified Opportunity record

As per the Salesforce documentation, the OpportunityTerritory2AssignmentFilter class will take up to 1000 qualified Opportunity record to process. But what will happen if the number of qualified ...
0
votes
1answer
50 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. ...
4
votes
0answers
88 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 ...
2
votes
0answers
130 views

Opportunity Territory Assignment in Progress… forever

I've just setup Enterprise Territory Management for a very simple org (1 type, 8 territories). Accounts assignment rules work fine but I'm struggling to get opportunity territory assignment working. I'...
4
votes
2answers
226 views

Preventing Recursive Future Calls

I have a usecase where when an account is updated, an after update trigger is fired. This trigger will call a future method which will call a SOAP API to assign the relevant territory assignment rules....
4
votes
2answers
116 views

What's the behavior/use case of “Apply to child territories” in Enterprise Territory Management?

In an attempt to learn my way around ETM, I built a toy territory model that looks like this: Corporation (Territory Type: Sector) Pennsylvania (Territory Type: Geographic) Philadelphia (Territory ...
1
vote
1answer
181 views

Old and the new Enterprise Territory Management

I read in one of the book that for old territory mgmt, forecasts are derived from territory hierarchy, and not forecast hierarchy. While for the new enterprise territory mgmt, forecasts are derived ...
0
votes
0answers
139 views

Territory Assignment Rules in Test Class

I have built a batch class for object ObjectTerritory2Association that is only considering the associations done by rules (AssociationCause = 'Territory2AssignmentRule'). Now I want to build the test ...
1
vote
1answer
84 views

How to filter by territory name in Lightning Experience dashboard?

I have a dashboard that contains a report, which deals with accounts and territories (Enterprise Territory Management). I would like to add a dashboard filter for territory name, also known as label. ...
0
votes
1answer
360 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 -> ...
0
votes
1answer
60 views

Territory Management Account assignment working in sandbox, but not in production

I noticed that our org had some Accounts that had not been assigned to a territory, due to problems with the addresses. I corrected the problems, but the Accounts still did not get assigned. I made ...
0
votes
0answers
45 views

How to prevent users from changing account owner if they are not in account territory?

We are implementing Territory Management 2.0 and have OWD of public read/write for accounts. Currently anyone can take ownership of an account. However, we want to only allow a person to take ...
3
votes
0answers
25 views

How to make the transition from Territory Management 1 to 2? [closed]

In our org we use TM 1. We want to switch to Lightning Experience, and for that we need to switch to TM 2, also known as Enterprise Territory Management. It looks like this is not an easy thing to do....
0
votes
0answers
23 views

Data loader fails all records in batch when one record fails while importing UserTerritory2Association object records

We have setup territory model in our org and now need to assign users to the territories. My CSV contains following fields: Territory2Id, UserId When my CSV contains records that don't have a value ...
0
votes
0answers
24 views

What is difference between “Manager of Territory” and “User Role Manager of Territory”?

I need to find two things 1. What is difference between "Manager of Territory" and "User Role Manager of Territory"? 2. how these kind of relation ship gets automatically created?
0
votes
0answers
53 views

Territory2-Data visible in tests but not used in trigger

I implemented a trigger functionality (insert, update on leads), that applies the the territory-management rules/assignments functionality from accounts to leads (e.g. leads can be assigned a new ...
0
votes
1answer
250 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 ...
6
votes
0answers
254 views

Why does SOQl query for Owner.UserRole.Name on Opportunity cause error in Opportunity Territory Assignment apex class

I've been working on an Apex class to do our Opportunity territory assignments based on the example here. I needed to modify it to support our rules that included checking the User Role on the ...
1
vote
1answer
95 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 ...
0
votes
2answers
18 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 ...
0
votes
1answer
114 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 ...
0
votes
1answer
137 views

How to get the UserName and territory name assign to user in single query?

I am new to the salesforce I am facing following issue. I want to show error message where I want to Display the userName and associated territory name. I am not able to get the both. Can you please ...
1
vote
1answer
61 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 ...
0
votes
0answers
143 views

Territory Management on Custom Object records

Is it possible to do share custom object records with users of specific territories? This article suggests it's possible to do programmatically; but fails short of showing how it's done for a custom ...
0
votes
1answer
277 views

How to share records for Territory group

I am trying to share record (Account) to Territory. I followed steps explained in Granting Access to Records. I have activated Enterprise Territory Management and created few territories. Still, I don'...
0
votes
1answer
130 views

Territory Management with Forecasts

What type of Forecasts should you use when you enable Territory Management? Collaborative or Customizable Forecasts? When the features of both the Forecasts categories are similar, how do you decide ...
0
votes
1answer
151 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 ...
0
votes
1answer
43 views

Cannot view Territory fields with Manage Territories setting enabled

We are using Enterprise Territory Management (aka Territory Management 2.0). We have an existing profile that is setup to manage territories. The users in this profile can view and edit territories. ...
0
votes
1answer
87 views

Territory assignment rules based on global state/territory pick list

Looking for confirmation that territory assignment rules based on global state/territory picklist code value don't work against the ISO code and only the Name field of the picklist value. I am unable ...
2
votes
1answer
179 views

Why is there no option to enable “Manage Territories” when editing the permissions for a profile?

I am trying to enable "Manage Territories" user permission in a profile but there is no option for me to. Is there a reason why that permission is not present?
0
votes
1answer
179 views

Delete a User from Territory

I have a user associated with a territory who has left organisation. Now I wish to remove the mapping association for this user. Removing this user from Territory assigned users page does not solve ...
1
vote
0answers
29 views

Restricting 'Assigned To' Field to only filter users that are within the role they are assigned Territory Management

I have implemented territory model in my salesforce Org. Coming to a particular account I want the related task should not have the user as an option to chose who is owner of the other territory not ...
2
votes
1answer
208 views

Seeing all Territory data in test, but SeeAllData is False

For some reason, am I seeing territory data (Territory2Model, Territory2) in my tests, but I have not set SeeAllData=True and I've even set SeeAllData=False. Without perform any test setup and ...
0
votes
1answer
17 views

'OperationLog' is not supported when running ETM rules

According to the ETM deployment guide, in order to run assignment rules a user needs the Customize Application and Manage Territories permissions. This is not correct. The result is an error that ...
0
votes
1answer
140 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 ...
0
votes
1answer
23 views

TM2 Related lists to show at the Top of the Account Page?

How can I get the Territory and Assigned User related lists to show at the top, or towards the top, of the Account Page? Users have to scroll down through the entire page to see who is working the ...
2
votes
2answers
286 views

How To Deploy UserTerritory2Association.RoleInTerritory2 Picklist Values

I've added several values to the new UserTerritory2Association.RoleInTerritory2 picklist. I tried to deploy the field using Salesforce Migration Tool: <types> <members>...
0
votes
1answer
548 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='...
0
votes
1answer
290 views

Auto-Assign Account to Multiple Territories using Territory Model and Assignment Rules

We have a territory hierarchy that allows a single account to belong to multiple territories. When running Assignment Rules, SFDC seems to auto-assign an account to only one territory, even when it ...
1
vote
1answer
527 views

Create 'ObjectTerritory2Association' programatically

I've ran into an issue trying to create a ObjectTerritory2Association object in a test class. When referencing this object, my class will not compile. There isn't a problem with the code as I can log ...
1
vote
1answer
237 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 ...
1
vote
0answers
230 views

Assign an account to an Enterprise Territory in Apex [closed]

Is there a way to assign an account to a territory2 (Enterprise Territory Managment) in apex?
2
votes
1answer
804 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 ...
4
votes
1answer
2k 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 ...
3
votes
0answers
311 views

Enterprise Territory Management — Previewing Rule Assignments

Enterprise Territory Management Issue I am currently examining implementing Enterprise Territory Management. I have a Territory structure set up in the Planning stage. According to the implementation ...
4
votes
1answer
355 views

No such column 'Territory2Id' on entity 'Opportunity'

Overview: "No such column" error presents itself when I wrap valid SOQL in Apex Class. I am familiar with what this error means, but in this situation I don't feel as though the error is justified. ...
2
votes
1answer
1k views

Assign account to Territory Rule in apex code

We have an issue with Accounts in wrong territories. Basically, we have an apex controller for Cases which modifies the account field that we are using to manage territories, but reading this link ...
0
votes
1answer
643 views

Cannot find where to assign users to territory

I have created a test territory and want to assign a user to it now. In the Salesforce guide it says I should go to the Territory detail page and add a user to the related list. I cannot find this. ...