Let the platform do the work

Creating a Relationship

Overview

Linking various pieces of information together is a vital function of CRM. Sugar provides three different ways you can create connections between modules: relationships, relate fields, and flex relate fields. For more information about each of these three types of connections, including a more thorough description of relationships, please refer to the article Introduction to Relationships and Relate Fields.

This article covers how to create relationships in Sugar.

Steps to Complete

The example below creates a one-to-many relationship between the Accounts and Notes modules.

  1. Navigate to Admin > Studio > Accounts > Relationships and click "Add Relationship".
    Add a relationship
  2. Select the relationship type as "One-to-Many" and choose "Notes" as the related module. Click "Save & Deploy".
    Add a one-to-many relationship with Notes
  3. Once the custom relationship is saved, it will appear in the list of relationships.
    New relationship listed
  4. Navigate to Admin > Studio > Notes > Layouts > Record View. Notice that the relate field for the Accounts module will automatically be added to the layout due to the relationship.
    Accounts field added to record view
  5. Now navigate to the Notes module and click the Create button. 
  6. Click in the box for the account relate field and start typing in an account. Sugar will auto-populate accounts that match. Or you can select "Search and Select
    which will bring up a search list view where you can search for an account to link.
    Add account to note
  7. Once the note record is saved, the related account will be displayed in the note record's record view.
    Note record view with account
  8. In addition, the note record will be displayed in the Notes subpanel of the related account record.
    Note on an account subpanel