1

I have custom object Territory that can have a parent Territory and child Territory. For example, Territory "United Kingdom" with child territories "Scotland", "Wales", "North Ireland" etc. Each of mentioned territories can have also child territories (cities). Each of mentioned territories (cities) also have child territores (streets) etc. Is it possible somehow to make a lookup/master-detail relationship for a Territory on itself?

2

You cannot create master-detail relationship when referencing the same object.

You could create lookup to the same Territory Custom object.

Just think about how Salesforce default Account Hierarchy works. It has default parent Account lookup field to itself.

Refer Object Relationships Overview

Lookup

Links two objects together. Lookup relationships are similar to master-detail relationships, except they do not support sharing or roll-up summary fields. With a lookup relationship, you can: Link two different objects. Link an object with itself (with the exception of the user object; see Hierarchical). For example, you might want to link a custom object called “Bug” with itself to show how two different bugs are related to the same problem.

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.