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-management]

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
27 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
130 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
0 answers
240 views

I have a formula component to assign Regions depending on country input of a lead. However, the formula is too long. Is there a workaround?

The requirement is to automate choosing regions, subregions, and theaters with the country input. We want this for reporting leads based on regions which is not offered by Territory Management feature ...
Emir's user avatar
  • 11
0 votes
2 answers
1k views

Territory Assignments on Account page in Lightning mode

Currently in my org having Territory rules as follows, "Account: Account OwnerEQUALS User1" then Account will assign with "Abc" territory. When we change the Account Owner in ...
Vinay's user avatar
  • 7
1 vote
1 answer
381 views

Invoke Opportunity Territory Assignment filter from another class

Can I invoke from another apex class, lwc or flow, ready-made filter class by salesforce (which described here)? I tried invoke it through anonymous window in dev console, used next lines of code: ...
Bob Greed's user avatar
0 votes
1 answer
556 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
180 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
1 answer
569 views

Salesforce Territory Assignment

I am implementing Territory Assignments in my org i have set it up. I just had a question that if an account is added into a territory or a new account matches the assignment rule of that territory ...
Nafess's user avatar
  • 11
1 vote
1 answer
533 views

Enterprise territory management vs Sharing rule

We have a requirement to share the accounts based on the region, cluster and territory they are in to the users. Right now, we have roles based on the region. Region, Cluster and Territory are custom ...
Praveen's user avatar
  • 10.1k
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
733 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
672 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
0 votes
1 answer
2k views

SOQL Query for Manually Assigned Accounts in a Territory

The goal is to query all Manually Assigned Account on a particular Territory. If possible, a query that can be run through Developer Console/Workbench. Is this doable? I can't seem to find anything ...
VanceSOQL's user avatar
  • 103
2 votes
0 answers
276 views

2gp: Problem with adding custom fields to Territory2 object via DX Unpackaged Metadata feature when creating package version

We are developing 2gp which heavily uses Enterprise Territory Management feature. And as part of post install configuration subscribers should manually create some custom fields with predefined names ...
wesaw's user avatar
  • 3,080
0 votes
1 answer
20 views

reassigning records in states to different region

So my organization is doing a little reorganization and want to assign three states to a different region. Right now, OK AR and LA are part of the SER. We want to change them to SCR. What first comes ...
Zeus's user avatar
  • 31
3 votes
1 answer
172 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
0 votes
0 answers
410 views

Returning the Territory Model name and Territory Name based on Account ID

I am trying to populate a custom field on my account object called "Original Territory" that tracks the value of a territory name from the associated Territory2 record. I am trying to create ...
helpfulhondaman's user avatar
0 votes
1 answer
263 views

Is it possible to perform upsert operation on UserTeritorry2Association?

I am writing a batch class on the UserTerritory2Association SObject and I need to perform an upsert operation. I have tried to use insert and records are getting created but if I need to do upsert I ...
Night Guy's user avatar
  • 214
1 vote
1 answer
768 views

Modify Territory Assignment Rules using Metadata API

Is it possible to use the Metadata API to modify existing Territory Assignment rule criteria? Currently we are using the Salesforce Mapping tool to build territories and then import into ETM. The ...
Dman100's user avatar
  • 2,445
3 votes
2 answers
531 views

Create Scratch Org with specific Territory2Settings

I am trying to create a scratch org with Territory2 enabled, as we have this in our production org and I want to mimic it as good as possible. The full documentation for this metadata can be found ...
Bast's user avatar
  • 161
0 votes
1 answer
153 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
2 votes
3 answers
6k views

Why is Territory management not available?

My org doesn`t have Territory Settings in setup. What is reason? Profile - System administrator, Organization Edition - Enterprise Edition
Igor Vasylevskyi's user avatar
0 votes
1 answer
917 views

Leads, Territories and Dashboard filter in Lightning Experience: impossible combination?

In Lightning Experience I have created a dashboard that displays a number of Account and Opportunity reports. These reports themselves do not apply any filtering on Territories, but the dashboard does....
Sander de Jong's user avatar
1 vote
0 answers
591 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/...
SFDC Learner D's user avatar
0 votes
1 answer
726 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?
晓天蔡's user avatar
0 votes
1 answer
590 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
405 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
0 votes
3 answers
905 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 ...
number41's user avatar
  • 960
1 vote
0 answers
339 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 ...
Ayush Goyal's user avatar
0 votes
0 answers
188 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 ...
thechrishaddad's user avatar
0 votes
0 answers
152 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 ...
number41's user avatar
  • 960
1 vote
1 answer
1k 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 ...
ebar's user avatar
  • 447
1 vote
1 answer
771 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
319 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
2 votes
0 answers
225 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 ...
bkwdesign's user avatar
  • 579
-3 votes
1 answer
143 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 ...
user72615's user avatar
5 votes
2 answers
419 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 ...
wesaw's user avatar
  • 3,080
2 votes
0 answers
91 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 ...
Vishal Bhame'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
2 answers
838 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 ...
user68561's user avatar
2 votes
0 answers
143 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 ...
Charles Koppelman's user avatar
1 vote
1 answer
3k 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 ...
DerrickE's user avatar
1 vote
0 answers
107 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 ...
Sudipta Deb's user avatar
  • 1,261
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
4 votes
0 answers
1k 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'...
David Roberts's user avatar
5 votes
2 answers
2k 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....
nica's user avatar
  • 1,400
5 votes
3 answers
2k 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 ...
David Reed's user avatar
  • 93.1k
1 vote
1 answer
840 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 ...
nica's user avatar
  • 1,400