2

At present I am using Standard Territory Management for Accounts.

  1. I would like to know whether We can use Custom Territory MGNT.
  2. I would like to know, Can I replace Territory mgmt with role hierarchy.

Any Idea..

  • 1
    What do you mean by custom? It's up to you how you define territories... Do you mean "for custom objects" maybe? Or "in different way than setup pages"? You could insert them in Apex / VF I guess... As for 2nd point - once enabled there's no going back but you could simply delete / unassign all territories. Roles and Territories can exist together. Maybe write some more about your business scenario & challenges? – eyescream Jan 21 '14 at 11:47
  • Thanks, Yes Defining territories can be done using Standard territory. But Can we do for Custom objects and in different way than setup pages. – Arun SFDC Jan 21 '14 at 14:28
1

Can we use territories on custom objects

http://www.salesforce.com/docs/en/cce/tm_decision_guide/tm_decision_guide.pdf

The Territory Management feature natively supports assignments of only account and opportunity objects. To assign additional objects—such as leads, orders, or custom objects—you must make significant customizations of your Salesforce organization.

So - not out of the box. Actually it might be a good idea for you to check this pdf including the awesome decision diagram.

You could achieve something territory-like by having for example criteria-based sharing on your custom object that'd be pointing to say multiselect picklist... That would cover the criteria part. The "share with" part would be nastier because it means you need LOTS of public groups with users and some sensible way to manage them.

Manage them outside of setup pages

Yes. Territory object supports create() calls = can be inserted from API. Same with UserTerritory and most objects from the diagram at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_erd_territory.htm

(I say most because it used to be impossible on Account Assignment Rules, maybe something has changed).

It will be painful to write unit tests for though because you'll be frequently hitting the MIXED_DML_OPERATION error, described for example at https://stackoverflow.com/questions/2387475/how-to-avoid-mixed-dml-operation-error-in-salesforce-tests-that-create-users

I've written a bit about it at What are the drawbacks of using territory management?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.