A small lightning component making it easy to highlight who the primary contacts are for an account based on their role. This component is intended to added to an Account record page. I did this as a person exploration into creating custom lightning components.
This project is stored in Salesforce DX format, so you will need to know how to work with sfdx projects using the cli or similar tool.
You will need a tool that allows you to use the sfdx tools provided by Salesforce.
You must enable multiple account relationships for contacts
Setup > Account Settings > Allow users to relate a contact to multiple accounts
A step by step series of examples that tell you how to get a development env running
- Clone the git repo
- Convert the source to standard Metadata format using
sfdx force:mdapi:convert
command - Deploy the component with
sfdx force:mdapi:deploy
command
To use this component, you must add it to the Account record pages
- Navigate to edit the Lightning Page Layout (easiest way is to view an account Gear > Edit Page)
- In the Lightning Component list, under custom there should be a component named "Primary Contact". Drag this onto the page.
- There are two settings you can adjust based on your needs:
Title: The text that will display at the top of the component (Default - "Primary Contact(s)")
Role: The role (from the related contact list) that will be used to filter the contacts displayed. Only a single role can be used. (Default - "Decision Maker")
This should likely be a primary part of your page. It makes it clear who you should be working with and what their contact information is.
Please feel free to submit pull requests or ideas to make this better!
This project is licensed under the MIT License - see the LICENSE.md file for details