Questions tagged [territory-management]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
8
votes
1answer
4k views

Territories field in Account

When I tried to add territories field in soql list<Account> soql=[select id,name,Rating,Territories from account Where ownerid!=:UserInfo.getUserId()]; I ma getting following error. No ...
7
votes
3answers
9k views

What are the drawbacks of using territory management?

I know that your sharing model complexity is compounded. Are there any other pain points?
6
votes
2answers
4k views

Territory management vs criteria-based sharing

Account records (and their child records through implicit sharing) can be shared with particular roles or groups based on criteria on that record. This is a large part of the value proposition within ...
6
votes
5answers
1k views

Why Account Assignment Rules removes Account from Territory?

I have a Territory Account assignment rule with a simple condition. If the Account Country = United States and State = XYZ, assign to a territory. The assignment rule works fine and there are accounts ...
6
votes
1answer
307 views

Rule-based Territory assignments are being created when there are no territory rules

In an existing instance, we have a territory hierarchy with no rules, just manual assignments. Since the Summer '13 release we are seeing AccountShare records with RowCause of 'Territory' which ...
6
votes
0answers
557 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 ...
4
votes
2answers
10k views

Difference between Role Hierarchy and Territory Management?

I have territory already setup with more than 1000 territories. I have seen that roles are not assigned in the org. In roles introduction page, I can see "Territory based Heirarchy" as 1 of the option....
4
votes
2answers
45 views

Managed Package: How to get rid of dependency from Territory Management feature

SF is going to drop Territory Management (aka TM 1.0) in Summer 2020. So we are trying to migrate our managed package to Enterprise Territory Management (aka TM 2.0). As the first step of such ...
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 ...
4
votes
1answer
430 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. ...
4
votes
2answers
421 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
1answer
783 views

pros and cons of Territory management

pros and cons of Territory management. can any one give the clear example, how the role sharing is effected to territory sharing
4
votes
0answers
171 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 ...
4
votes
2answers
233 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 ...
4
votes
0answers
598 views

How to control custom object through territory management?

I have 2 custom objects and tabs. Accounts and Users are assigned manually in my org. How to I control their visibility/security according to territories? Are there any samples that I refer to? That ...
3
votes
1answer
640 views

Testing Winter '15 - New Clause USING SCOPE values

I am trying to test "Using Scope" on a custom object, orders which has a MD relation to Account. I'm trying to filter a list view of Orders to show only by User's territory, like we have in Account ...
3
votes
0answers
21 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 ...
3
votes
2answers
83 views

Sharing of Accounts in Enterprise Territory Management

I struggle a bit with the ETM topic. I have set up ETM in SF and defined the dataflow to cover ETM sharing logic (with security predicate) in Analytics. However when I checked for a specific user I ...
3
votes
0answers
308 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'...
3
votes
0answers
31 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....
3
votes
1answer
406 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 ...
3
votes
0answers
186 views

Territory Management - Implications to sharing model

Can someone briefly explain the high level implications to the sharing model when using Territory management?
2
votes
2answers
376 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>...
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 ...
2
votes
2answers
485 views

Disable Territory Management

We are currently using territory management in SFDC. We want to disable it(we ourselves cannot do it, assume Salesforce can do it). What could be the impact of disabling Territory Management? ...
2
votes
1answer
311 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?
2
votes
1answer
346 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 ...
2
votes
1answer
728 views

Is it possible to limit access to records based on profile's region?

currently system admin profile for all countries USA, India, China. Can we have custom system admin profile only for one country like usa, in which he isn't able to access the other country records ...
2
votes
1answer
218 views

Get Account and Account Owner User map

I need to get the Account owners. In our case they are the users assigned to territories. Below is my approach. Query the Accounts Query the AccountShare object for above accounts select Id, ...
2
votes
1answer
1k 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 ...
2
votes
1answer
935 views

Territory Management 2.0

I'm new to the concept of Territory Management in SFDC. Our organization uses zip codes to assign accounts & leads to sales rep (via assignment rules). As a result we have hundreds of assignment ...
2
votes
1answer
591 views

Territory in Salesforce

At present I am using Standard Territory Management for Accounts. I would like to know whether We can use Custom Territory MGNT. I would like to know, Can I replace Territory mgmt with role hierarchy....
2
votes
1answer
83 views

Divide data on the regional basis

It would be great if any help on how to implement the business requirement below.. We are having teams across regions, data on custom objects belonging to a region should not be accessible between ...
2
votes
2answers
2k views

Create user with territory for runas in test method

I have created a functionality where in the current user's(who doing the action) territory is queried and is updated on the account object. The functionality is working fine but i am facing an issue ...
2
votes
0answers
14 views

How to Restore custom Territory Management data in Enterprise Territory Management?

Recently we have switched from Custom Territory Management to Enterprise Territory Management. During this transition we have lost our data. (I am Not able to see any territory hierarchy / rule ...
2
votes
0answers
29 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 ...
2
votes
1answer
908 views

Enterprise Territory Management - Need to assign account ownership based on one of the assigned territories

Using ETM or TM2.0, we would like to switch account ownership when the territory assignment rules are executed and territories are assigned to accounts. If John Doe covers US West territory, all ...
1
vote
1answer
156 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 ...
1
vote
2answers
1k views

Problems writing a Test class for the salesforce OpportunityTerritory2AssignmentFilter class

I am trying to write a test class for OpportunityTerritory2AssignmentFilter It implements the TerritoryMgmt.OpportunityTerritory2AssignmentFilter and is a sample class provided by salesforce. Has any ...
1
vote
1answer
217 views

Enable Territory Management in Developer Edition

Is it possible to enable territory management in the free developer edition? This page (https://help.salesforce.com/HTViewSolution?id=000175737) says this function is available "with the Enterprise, ...
1
vote
1answer
234 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
1answer
360 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 ...
1
vote
1answer
707 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
277 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
2answers
763 views

How do you enable Territories in Salesforce

How do you set up Sales Territories in Salesforce,in previous versions there was an option called "Manage Territories" under Administration Setup I no longer see this in the Administer section. Were ...
1
vote
1answer
2k views

How to build Relationship between Territory object and Custom objects?

Is there a way to have a relationship established between Territory object and custom objects. It can be either via look-up relation or master-detail relation. And can we change the name of the filed ...
1
vote
2answers
154 views

Restricting data based upon value in the picklist

I have a scenario in which I need to restrict some records(accounts) which should be seen to a particular person only if the value in the picklist Type='Client'.How can I implement this scenario....
1
vote
1answer
259 views

Enterprise Territory Management (Territory Management 2.0) and Customizable Forecasting? Possible?

I want to implement Territory Management and Forecasts but the new orgs offer Enterprise Territory Management and Collaborative Forecasts, which are not integrated to work. Can I shift to Customizable ...
1
vote
2answers
1k views

Enabling Territory Reports in Territory Management 2.0

We have enabled Territory Management 2.0 in our Salesforce org. However, we cannot find the Territory Reports as described here: https://help.salesforce.com/HTViewHelpDoc?id=reports_territory.htm&...
1
vote
1answer
307 views

Account visibility for Territory management

I'm facing a problem after creating a new MD relation account__c for a custom object subscribe__c for territory management. When I click on the lookup button for account__c field, I get a list of ...