Custom Object Relationships

The relationships that you define for your objects determine if the data in the objects can interact with data in other custom objects or standard objects.

Objects must be related to use fields from one object on another object’s workspace. For example, if you want fields from the incidents table to be available for use on a custom object’s workspace, the incidents table must have a relationship with the custom object.

When relationships are defined, objects are either parents or children of the object you are editing. Most custom objects and standard objects can be either parents or children of other custom objects. The list that follows shows the standard objects to which relationships can be made.

Note: Relationships between the quotes and opportunities standard objects are not supported. Relationships with some internal tables, such as common_users, are not included in the list that follows.
  • Accounts
  • Answers
  • Assets
  • Community Comment
  • Community Question
  • Community User
  • Contacts
  • Incidents
  • Opportunities
  • Organizations
  • Quotes (cannot be a parent in relationships)
  • Sales products (cannot be a parent in relationships)
  • Tasks

Whether you are defining parent or child relationships, two types of relationships are available:

  • Aggregation—This creates a close relationship between records in the objects. Use this type if you want records in the child table to be automatically deleted when their parent record is deleted from the parent table. For example, incidents belonging to a contact are deleted when the contact is deleted. If several tables are joined with aggregation relationships, deleting a record in the parent table automatically deletes all related records in the other tables.
  • Association—This creates a loose relationship between records in the objects. Use this type if records in the child table should not be automatically deleted when their associated records in the parent table are deleted. For example, deleting a staff account does not delete incidents created by the account.

When you define relationships between objects, they are joined by integer fields that contain unique values (the field contains a unique value for each record in the object). Each custom object can have one such field. For example, incidents are linked to contacts using the Incidents.Incident ID (incidents.i_id) and Contacts.Contact ID (contacts.c_id) fields. These are both integer fields that contain unique values.

Note: Relationships to menu-only objects are automatically created when the menu-only object is used to populate menu fields in custom objects. These relationships cannot be manually deleted, but are deleted when the menu-only object is no longer used to populate menu fields or when the menu-only object is deleted.