Define a Relationship

Define a relationship for a custom object.

  1. Click Configuration on the navigation pane.
  2. Expand Database, and then double-click Object Designer.
  3. Select the object or system attribute you want to edit relationships for or create a new object.
  4. Click Relationships.
  5. Click Add, to add a Parents of Object relationship or a Children of Object relationship.
    1. Click Type.
    2. Select the type of relationship.
      • Aggregation—Use this relationship 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.
      • Association—Use this relationship 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.
    3. Click Parent Object or Child Object.
    4. Select the object you want to link to.
    5. If creating a parent relationship, click Child Field.
    6. Select the field in the object you are editing that you want to use as the link to the parent object.
      If the object does not have a field that you can use as the link, or if you don’t want to use one of the existing fields, you can select Auto Generate New to have an integer field created automatically. The new field will then be added to the object you are editing, and will be used as the link to the parent table. You can view the new field on the object’s Fields page.
    7. If creating a child relationship, click Child Field.
    8. Select the field in the child object that you want to use as the link to the object you are editing.
      Note: If the child is a standard object, you will need to select an integer or menu system attribute that has been created for the standard object. If a system attribute does not exist, or if you want to use a different system attribute, select Auto Generate New. A new system attribute with an integer data type will automatically be created for the standard object.
  6. If you create more than one relationship to the same object, select the option in the Main column next to the relationship you want to use as the main relationship between the object and the custom object.
  7. To delete a relationship, click Delete.
  8. To edit an existing relationship, click Edit Relationship > Edit.
  9. Click Save.
    This also saves any system attributes that have been automatically created for standard objects in the steps above.