Creating Related Records
If you’ve read the above and wish to create separate but Related Records and you’ve planned the relationships between those Records, you can create the links in the Creation Studio when Editing Record Fields. A special field type called “Picker” is used to create the relationship. Only one Picker is needed, on the “many” record template in the relationship.
We will create a new field that links the two Record Templates. To do this, click the New Field button.
In the New Field Panel, name Record Template that you wish to link. In this case, we are linking the Account. In API Name for a picker field, it is best practice to add “_id” to any linked Record Templates. This will help in cases in which you need to upload data and you need to know which fields require a system id number as opposed to plain text. (Otherwise, the links will be lost upon upload. Trust us. We’ve done this a few times.)
Under Type, choose Picker. This will designate to the system that you’ll be picking another Record Type in this field.
Lastly, click Constraints and a listing of all current Record Templates in the system will appear. Choose the appropriate Record Template that you wish to link. In this case, we will choose Account.
Finally, if you have a default value that you wish to set, choose that now. The field will show a listing of all possible options already in that field type. A possible use case for this is if you have Currency as a record type, and you wish for the default to be USD, but still have the option to choose other currencies.
In this case, we will leave it blank since the Account will always need to be updated. Click Save.
Displaying Related Records on a Record Layout
One to One Relationship (single link)
To view the Account information on the Contact page, you will simply need to add the new “Account” picker field (account_id) via the Contact’s Record Layout. This is done the same as adding any other field. Instructions on this can be found here.
One to Many Relationship (table)
There will likely be many contacts associated with a single account. To view the Contact information on the Account page, you will go to the Account Record Template, and create a table on the Record Layout. This is the “many” side of the relationship. You do not need to create another Picker field on the “many” record template.
From Record Builder, choose the Account Record Template (or which ever record is your One in your One to Many relationship).
From the Record Template edit screen, choose Edit on the Record Layout tile.
Choose the Page and Group to which you want to add your Many records. In this case, we have a page called “Contacts” and a Group already called Key Contacts. Click Edit within the Group tile.
In the Layout creation screen, click the Table button.
Choose the Record Template type that you wish to link. In this case, we’re linking the Account (Contacts).
You will be presented with all fields available to view from that Record Template. Choose the fields that you wish to be viewed on the Account page. In this case, we’ll choose Name, Decision Making Power, Email, Created At and Phone Number. Once chosen, click Create.
You can re-title the table name in the Custom Label box, and then adjust your fields to the order you wish to see them. Click “Add Fields” to insert more columns. By hovering over the column, you will also see options to rename the column or remove columns.
Once complete, return to the Page Overview and click Publish.
From the Account Record Instance and the Contacts page, you will now see a table listing the contacts on the account.
Note you can only see three lines in this view. Click Expand and Edit to view all.
From this page, you can also add new rows (in this case contacts). And any newly added contacts linked to the account will appear in this table.
This type of viewing can be used for Opportunities on an Account, Contracts on an Account, etc.
View a Record Template’s Existing Relationships
While in a Record Type, such as Account, you can click into the settings menu to view all Record Templates associated with the current one.
Choose the first option “View Relationships.”
A listing of all Related Records, to and from, the current record will be listed.
View a Graph of All Record Relationships
After creating the linking fields on all appropriate Records, you will be able to see a map showing these relationship from the Creation Studio and in the Record Builder tile.
Select the graph icon to open a visual representation of your Record Template relationships. You can choose various options for display of these associated Record Templates, giving you a picture of how your data fits together. Try clicking on a node in the graph to change the focus. Export this graph for use in other tools.
Please sign in to leave a comment.