Questions tagged [territory-management]

The tag has no usage guidance.

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

Account Territory Sharing Rule remediation in Enterprise Territory Management

Account Territory Sharing rule is no longer available to ETM, and as per salesforce the remediation should be like below: Original Territory Management (TM1) to Enterprise Territory Management (ETM/...
0
votes
0answers
11 views

Is it possible to activate Territory2Model via Apex?

I can't find anything in any Salesforce documentation that says this is NOT possible but nothing that confirms it either. Use Case: I need to create and activate a Territory2Model in a Test Class so ...
0
votes
0answers
21 views

How to restrict users with 'Manage Territories' permission from archiving Territory Model?

I want to restrict all users with 'Manage Territories' permission other than System Admin from archiving (& delete) Territory Model. I created a Trigger on Territory2 object successfully to ...
0
votes
0answers
10 views

How to associate Assignment rule to territory via Data loader

I've uploaded territories, Assignment rules, Assignment rule items but I'm not sure how to associate an active assignment rule to a territory through data-loader?
0
votes
1answer
19 views

Remove assigned territory in account

How can we remove the assigned territory in the account after it's been auto-assigned via assignment rules?
0
votes
0answers
20 views

How to get all childs from a Territory2 record?

I need to show a picklist in a visualforce with all the related territories of an user. These territories are the user's assigned territories and all the territories under them in the territory ...
0
votes
1answer
27 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 ...
0
votes
0answers
14 views

How the Territory got assigned to account after deactivating the Assignment Rules Assigned to This Territory in Salesforce Org

I have deactivated Assignment Rules Assigned to Territory and still i am able to see the territory got assigned to account record while creation. Can you please guide why this is happening. Thank ...
0
votes
0answers
18 views

Create an ObjectTerritory2AssignmentRule specific for an Enterprise Territory in Apex

I am trying to create an Assignment rule using apex and want to create it for a territory2 object. What I have seen so far in the API Documentation for ObjectTerritory2AssignmentRule, there is no way ...
0
votes
0answers
15 views

Enabling Territory Management 2.0 in Dev box via PROD refresh

This is regarding Territory Management 2(TM2) enablement. We have multiple sandboxes but we do not want to perform all the steps in all the Orgs. Is it a correct approach to skip enabling one of the ...
0
votes
0answers
17 views

Account Territory not automatically set to an Account Owner's Territory

we have created territory. in that territory we have assigned user and created account assigned territory rule. we have given condition like : Account : State/Province = "CA". that territory should be ...
0
votes
1answer
23 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 ...
0
votes
0answers
8 views

MyTeamTerritory ListView FilterScope

I am looking for some clarification on what the MyTeamTerritory filterscope defines as a "team". The documentation is light in the Metadata API and the results I am seeing are not as I would expect. ...
0
votes
0answers
14 views

Accounts not assigned to territories Report

Attempting to create a report for Enterprise Territory Management, while following the implementation guide. The screenshot below comes from the Enterprise Territory Management Implementation Guide ...
0
votes
2answers
61 views

Trigger Recursion after API Callout to Run Territory Assignment Rules

I am trying to trigger territory assignment rules on accounts via the API (the only way you can, apparently), and then change the account owner based on the territories that are assigned. It’s an ...
1
vote
0answers
28 views

Field History Tracking for Territory Field on Opportunity object

I want to enable field history tracking for Territory field (API Name Territory2) on Opportunity Object. However on field history tracking page, I cannot find that field, so I am not really sure if ...
0
votes
0answers
33 views

Using Territory Management Users for Dynamic Sender Profiles

I was wondering if anyone has ever come across the use of territory users being used as dynamic sender profiles for a one-to-one direct marketing experience. The issues I am currently experiencing ...
0
votes
0answers
18 views

SOQL Not Finding Results Based On Territory2Id Filter

I have a query looking for records whose Ids are in a set, and SF is acting like the IDs are not there, when all the debug logs show that they clearly are. Here are the debug statements clearly ...
0
votes
0answers
21 views

Does territory hierarchy rolls up access to records?

I have been working on territory hierarchy and I have some doubts regarding how the access actually opens up. Lets assume the OWD is set to private for Account object. I have a territory model let's ...
1
vote
1answer
54 views

How to create a My Territory Accounts List View that uses Enterprise Territory Management

The "My territories" list view is returning 0 records. I have recently enabled Enterprise Territory Management and created a Model that is in status "Planning". I have assigned Accounts and Users to ...
0
votes
1answer
30 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 ...
1
vote
0answers
33 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 ...
0
votes
0answers
51 views

How can I associate currency with territories

I want to be able to restrict the currencies used or selected based on territory assigned to the user. How can I achieve this in salesforce. Multi-currency and territory management is used in my org.
0
votes
0answers
30 views

Territory Model with developer name undefined not found

In my scratch org, I can "Enable Enterprise Territory Management" to start using the territory 2 stuff. I can build out a simple model, with a territory and rule and activate it, assign a user etc. ...
2
votes
0answers
66 views

Cannot get territory2Settings in a Winter '20 Scratch Org

I couldn't get this to work for the current '19 org either, fwiw According to the Metadata coverage report, I'm supposed to be able to use territory 2 features with this bit of sample scratch ...
-3
votes
1answer
69 views

Regarding code coverage [duplicate]

Below is my class but i am not able to cover single line also , can anyone help me out in this test class, i am not understanding why i am not able to cover single line. global class ...
4
votes
2answers
89 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 ...
0
votes
0answers
30 views

not updated all opportunities with OpportunityTerritory2AssignmentFilter after enabling ETM

I have enabled the ETM in production and created opportunity assignment class which is provided by salesforce. When i click on Run opportunity filter button on territory model hierarchy,few records ...
2
votes
0answers
25 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 ...
3
votes
0answers
29 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
189 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 ...
2
votes
0answers
40 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
547 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
54 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
181 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
293 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 ...
3
votes
0answers
544 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'...
5
votes
2answers
776 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
425 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
495 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
345 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. ...
1
vote
1answer
1k 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
186 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 ...
3
votes
0answers
37 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
101 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
747 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
1k 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
243 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
25 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
370 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 ...