Skip to content

Relationships ​

In this article we cover what a relationship actually is, the different shapes one can take, how to create and delete your own, and how linking records to each other works day to day.

What is a relationship ​

A relationship connects two modules together, for example "Accounts have many Contacts," or "Every Deal belongs to one Account." Once a relationship exists between two modules, you'll see it as a panel on the Related tab of any record in either module, showing whichever records from the other module are currently linked.

Cubrel ships with a set of relationships already built in between the standard modules (Accounts, Contacts, Deals, Quotes, and so on); these are called system relationships. You can also create your own custom relationships between any two modules, including custom modules you've built yourself.

Activities, such as tasks, calls, and meetings, are linked through relationships too, but they show up on the record's activity timeline instead of the Related tab. See Activities.

The three shapes a relationship can take ​

When you create a relationship, you're describing how many records on one side can connect to how many on the other:

  • One to One: each record on either side can be linked to at most one record on the other side. Useful for a strict pairing, like one Order to one Shipping Label.
  • One to Many / Many to One: one record on one side can have many linked records on the other, but each of those "many" records only ever belongs to one of them. "One Account has many Deals" and "Many Deals belong to one Account" are the exact same relationship, just described from opposite sides. Cubrel lets you create it from whichever module makes more sense to you, and figures out the direction automatically.
  • Many to Many: either side can be linked to any number of records on the other, with no limit on either end. "Contacts to Cases" is a typical example: one contact can be involved in several cases, and one case can involve several contacts.

How a relationship shows up depends on its shape ​

  • If your module is on the "many" side (or it's a Many to Many relationship), the panel shows a list of every linked record, with a count and pagination if there are a lot of them, plus a button to add more.
  • If your module is on the "one" side of a One to Many relationship, or it's a One to One relationship, the panel shows just the single linked record (if any), with a quick way to unlink it or swap it for a different one.

Creating a custom relationship ​

Go to Workspace > Modules Manager > [pick a module] > Relationships > Create new relationship, and fill in:

  • Related Module: the other module this relationship connects to.
  • Name: an internal identifier, not shown to end users. Cubrel fills it in from the two modules; you can change it.
  • Type: One to One, One to Many, Many to One, or Many to Many, as described above.

A relationship has no label of its own. On each side, its panel is titled with the other module's name: Accounts show a "Deals" panel, Deals show an "Account" panel. Users are relatable too, so you can link records to people on your team.

It doesn't matter which of the two modules you create it from; pick whichever one you happen to be looking at. If you want "many Deals to one Account" and you're on Deals' Relationships page, choose "Many To One" and pick Accounts as the related module; Cubrel stores it correctly either way.

What can't be changed after creation ​

Once a relationship is created, its shape and the two modules it connects can't be edited afterward. There's no "edit" option, only create and delete. If you need something different (a different type, or a different pair of modules), delete the old one and create a new one in its place.

Deleting a relationship ​

  • System relationships (the ones Cubrel ships with) can't be deleted at all; the delete button is disabled for these.
  • Custom relationships you've created can be deleted at any time. If there are records currently linked through it, you'll be shown exactly how many before you confirm. Deleting the relationship removes all of those links permanently, along with the relationship itself, and removes its panels from both modules' layouts. This can't be undone.

Linking and unlinking records ​

From any record's Related tab, open a relationship's panel and:

  • To link a record, click the add/link button, search for the record you want, and select it.
  • To unlink a record, use the unlink action on that record (a single click for a "one" relationship, or a remove action next to each entry in a list for a "many" relationship).

If you link a record to a new "one" on a One to Many relationship, for example moving a Deal from one Account to another, the old link is automatically replaced. A "many"-side record only ever belongs to one "one"-side record at a time, so re-linking it elsewhere is just how you move it, not an error.

Linking and unlinking need the Link permission on the record's module; see Roles and Permissions. If the record you need doesn't exist yet, use Create record in the search window to create it on the spot; it's linked as soon as you save it.

Every link and unlink is recorded in the Audit Trail on both records involved; see the Audit Trail guide.

Customizing what shows up, and what columns you search by ​

Two separate things are configurable per module, under Workspace > Modules Manager > [module] > Layouts:

  • Which relationships appear as panels, and how they're arranged on the Related tab: the Related Panels layout editor lets you add, remove, and reorder them.
  • Which extra columns appear in the search window you get when linking a new record. Beyond just the record's name, you can show a couple of relevant fields (like status or owner) to help pick the right one, configured via the Linking Panel layout editor.

See Layouts.

In short ​

QuestionAnswer
Can I create my own relationships?Yes, between any two modules, from either module's settings page
Can I edit a relationship after creating it?No, delete and recreate instead
Can I delete a built-in (system) relationship?No, never
Can I delete a custom relationship?Yes, any time; you'll see how many links it has first
What happens to links when I delete a relationship?They're all removed permanently, along with the relationship
What happens if I re-link a "many" record to a new "one"?It moves; the old link is replaced automatically
Can I create the record I want to link on the spot?Yes, with Create record in the search window
Is linking/unlinking tracked?Yes, on both records, in the Audit Trail