We’re rewarding the question askers & reputations are being recalculated! Read more.
13

I've used Territories only once and I'm not sure I'd recommend them ;) What's nice Self-service for users. Key business people in given geography can assign territories at will without involving IT. Combine it with "Delegated Administrator" and you get power users trained to deactivate employee that leaves, transfer all his records to new owners if needed &...


10

The primary difference between the two is the question of "how many"? In the role hierarchy, you are allowed one role as a user. So if I am in a sales hierarchy where it is only regional (East, Central, West, for instance), no problem. But what if I also have an industry vertical, and I need to be in both East, and the Manufacturing vertical? This is ...


8

Territory Management is more than just a sharing device, it probably makes sense when there exist clearly defined Sales Territories, with Sales Reps mapped to Territories and where Sharing Accounts and Opportunities would be tedious through conventional means - be it Account/ Sales Teams and/or Ownership/Criteria Based sharing rules. Everyone in a territory ...


7

"Territories" appears to be a field but actually is something else (similar to how Billing / Shipping Address field can't be queried because it really consists of 5 inner fields and how Contact Name = Salutation + First Name + Last Name). http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_erd_territory.htm You'll have to query through the ...


5

I would also have a look at this doc put out by the CCE team - it has a really nice decision tree diagram for when to use TM. http://wiki.developerforce.com/page/Territory_Management_Decision_Guide


5

How do I mass delete Territory2 records in Apex? You don't. You can use the REST or SOAP API, or an app like the Apex Data Loader, but a Territory isn't something you can automate directly in Apex Code. It's restricted because of the implications of doing this in something like a trigger, which could potentially cause sharing row locks when territories are ...


4

as you mentioned USING SCOPE is new with Winter 15 .. and you can use it with API version 32.. If you are using Workbench, select api version 32 when you login or change your api version to 32 in your session settings after you logged in to workbench and give it a try.. it should work.. when i run the below query in Developer Console in my sandbox which ...


4

**As we all know. Currently we can't run territory assignment rule from apex. But We can use SOAP API for this requirement You need to use SOAP API for firing the territory management rule. You can call pass the same org(which one you are using) credentials. Use this class TerritoryMangRule.fireTerritoryManagementViaSoap(Pass list of Account here). ...


3

I think your best best would be to call Salesforce support directly to try to get this enabled. As far as I know theres no way to use it without having support enable it for you. Someone please correct me if I am wrong.


3

Since I can't found an OOTB test class for this anywhere, I just wrote one up real quick. Requirement in OpportunityTerritory2AssignmentFilter class: You will need to mark the inner class and its constructor @TestVisible @testVisible private class Territory2Priority { public Id territory2Id { get; set; } public Integer priority { get; set; } ...


3

Territory2Id is indicative of Salesforce Territory Management Version 2.0 that was released in Summer 14 as beta and apparently in PROD as Spring 15 so your class version needs to be at least V33 - thanks to @DasUber for pointing this out The reason it worked in execute anonymous and query editor in Developer Console is that tool uses the current version of ...


3

Enterprise Territory Management is just the successor of the former Territory Management, with a couple of new features. You find details in the Enterprise Territory Management Implementation Guide. Unfortunately, you still can't share a custom object to territories, just Accounts and objects that are related to Accounts, like Opportunities. For a ...


3

Starting with version 38.0, you should be able to deploy most standard picklist fields using the "StandardFieldSet" metadata type. However, in the list of standard picklist values that are supported, RoleInTerritory2 does not appear (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/standardvalueset_names.htm) Try changing your ...


2

Just a few points of clarification regarding Territory Management capabilities as it relates to Person Accounts and Contacts: The Territory Management feature in Salesforce natively supports assignment of Account and Opportunity objects, not Contacts. While Person Accounts represent an individual, they are a type of Account record, they are not the same ...


2

I don't believe custom objects fall under the scope of Territory Management, it is primarily focused on Accounts. https://help.salesforce.com/HTViewHelpDoc?id=territories_def.htm&language=en_US If your custom objects can fall under accounts, I think you can give them a Master-Detail relationship with the accounts and inherit the security access. ...


2

You will need to create a series of maps, one at each step, to create the linkage. First a map of accounted to groupid - Map. The one item that could be tricky would be the user to group mapping. Since more than one user could be in the group, the final map might need to be a list map - Map>


2

The question doesn't contain a lot of details, but to my knowledge there are 3 high level directions you can investigate in. 1) private sharing models and (apex based) sharing rules. I think this is what you'll want to do. 2) Territory management, this is a salesforce feature. 3) multiple salesforce orgs, possible with integration set up where needed, and ...


2

Territory management basically related to sharing model of an organization. We can say it is a structure based sharing. It allow sharing of information according to geographical condition or some specific type of accounts which are categorised by some fields. Territory management allow us to manage complex sharing between accounts which have some similarity ...


2

The way I read that announcement, no. I don't consider any standard connections to be "ace detail", however it trueessayhelp says obviously that Territory chips away at standard items, not custom. However, try it out. –


2

Good news! The things have changed since Spring 14 release: As of Spring '14, organizations that use Territory Management can disable the feature if necessary. ... To disable Territory Management for your organization, contact salesforce.com Customer Support. The territory management configuration and data will be backup for the case if you will ...


2

First, as you've likely discovered, you can't delete territories that have children. But there's a workaround for that. It involves exporting your data using DataLoader into a CSV file, editing the file, then importing it again to Delete them by working from the Bottom Up. You may need to repeat the process until you have no errors. From How to Mass Delete ...


2

As per the doc, ObjectTerritory2Association Available only if Enterprise Territory Management has been enabled for your Salesforce org. Follow below path to enable Enterprise Territory Management- From Setup, enter Territories in the Quick Find box, then select Settings. Click Enable Enterprise Territory Management.


2

As of v39.0 these can be retrieved/deployed as Standard Value Sets. RoleInTerritory2 does not appear in the docs but it still works alright: package.xml <Package> <types> <members>RoleInTerritory2</members> <name>StandardValueSet</name> </types> <version>39.0</version> </...


2

While the documentation doesn't explicitly call it out, the documentation does say: Starting with Apex code saved using Salesforce API version 24.0 and later, test methods don’t have access by default to pre-existing data in the organization, such as standard objects, custom objects, and custom settings data, and can only access data that they create. ...


2

Only certain licenses are allowed to access territories (and thus manage them). If you're editing permissions for a profile for a license that doesn't have access to territories then you can't enable territory management. E.g, a profile associated with a full Salesforce license will have the option but a profile associated with a Force.com - App ...


2

I rewrote your code: // Fetch Region 3 data List<Territory2> Region3 = ([SELECT Id, Name from Territory2 WHERE Name='Region 3']); System.debug(Region3[0]); // Fetch Assigned Users to Region 3 List<UserTerritory2Association> utList2 = new List<UserTerritory2Association>([SELECT Id, RoleInTerritory2, Territory2Id, UserId from ...


2

Territories are Account based, but Forecasts are Opportunity based. With Enterprise Territory Management (TM2), there can be many different structures to Account Territories, not all of which are strictly based on a single hierarchy. Account assignment rules can be geographic-based, product-based, customer-size based (in terms of number employees, sales, etc)...


2

You want to look at ObjectTerritory2Association. Represents an association (by assignment) between a territory and an object record, such as an account. Available only if Enterprise Territory Management has been enabled for your Salesforce org. For instance, if you have a specific Territory2 record and you want to get all related Account records, it ...


2

As it's been stated before, you need to engage Partner Support. Once a managed package has a dependency on a feature, and a version with that dependency is uploaded, it cannot be removed by the ISV. This restriction is in place to allow for upgrades.


1

Ok So the internal class of Territory2Priority ( the type) is noted as Private and you are trying to access this in a test class. Private will make it only visible inside its class constant. +1 salesforce here, Add @TestVisible on top of the private and you will be able to access the class from your test. Updating the second part In the test you are ...


Only top voted, non community-wiki answers of a minimum length are eligible