Contact Roles in Lighting for Salesforce Accounts
Contact roles in Lightning can be managed a few different ways, but one of the most powerful and adaptable is through a custom junction object. This posts gives a video walk through and screenshot step outs for this solution.
Video walk through:
Step One: Create a new custom object.
Go to Setup
Select Object Manager
Select Create > Custom Object
Label: Account Role
Plural Label: Account Roles
Starts with vowel sound: checked
Object Name: Account_Role
Record Name: Account Role Name
Data Type: Auto Number
Display Format: AccountRole-
Starting Number: 0
Allow Reports: Checked
Allow Activities: Unchecked
Track Field History: Checked
Allow in Chatter Groups: Unchecked
Allow Sharing: Checked
Allow Bulk API Access: Checked
Allow Streaming API Access: Checked
Deployment Status: Deployed
Allow Search: Unchecked
Add Notes and Attachments related list to default page layout: Unchecked
Launch New Custom Tab Wizard after saving this custom object: Unchecked
Step 2: Add Master-Detail Relationship & Picklist Fields
From the new Account Roles object, go to Fields & Relationships > New
Data Type: Master-Detail Relationship
Related To: Account
Field Label: Account
Field Name Account
Child Relationship Name: Account Roles
Make visible to relevant profiles
Add field to Account Role page layout
Add related lists to Account page layout(s)
Repeat Steps for Contact Master-Detail Relationship field
Add a picklist field for role options (Eg, Executive, Approver, Influencer, End User)
If desired, add a controlling picklist to categorize roles. For example, to split up roles assigning someone from your company to the account and external roles designating functions of people in the account.
Step 3: Update Lightning Page and Page Layout
There are two key steps to updating the layout. The first is to update the page layout, edit the related list on the page layout to include the following fields: Account Role Name, Contact Name, and Role.
The second step is to edit the lightning page as desire to position the related list in an accessible location.
Step 4: Leverage Your Data
Lastly, leverage your data! You may want an accounts with contacts with tasks report if you associate tasks (eg calls) with a contact. You may want to find a list of all executives and approvers with their email addresses to invite to your VIP lunch. Whatever the case, you now have a data framework to build on and report from.