Skip to main content

Contact Information component

The Contact Information (PJN_ContactInformation) component is an Aura component that enables users to view and edit existing contact information and add new contact information for a given Account record. The component is added to Account and Care Plan (Case) record pages.

Columns and rows

The Contact Information component is managed by the Contact Information (mvn__PJN_Contact_Information__c) custom object such that each column is controlled by a field on the object while each row is a record of the object. The rows are sorted alphabetically based on the Contact Information record type, except for Phone (PJN_Phone) records, which will always appear below all other record types.

  • The Type column is managed by the Type (mvn__PJN_Type_Formula__c) field to display the record type and correspondence type of the contact information.

  • The Value column is managed by the Value (mvn__PJN_Value__c) field to display the combined details of the record type.

    Note

    If the click-to-dial functionality is enabled and a telephony system is integrated, then the Value column for a Phone (PJN_Phone) record type will become clickable such that users can click on the phone number to initiate an outbound call with the integrated telephony system. Clickable phone numbers are only available in the Contact Information component. If users click View All or the title of the Contact Information component to open the standard Contact Information related list, users will not be able to click the phone numbers to initiate calls.

    Contact Information component showing Click-to-Dial functionality
  • The Primary column is managed by the Primary (mvn__PJN_Primary__c) field to indicate whether or not the given value is the primary value for the given record type.

In some instances of the Contact Information component, such as in the Care Plan (Case) record page, an additional Privacy Consent Status column appears. This column is managed by the Consent Status (mvn__PJN_Consent_Status__c) field in the Channel Consent (mvn__PJN_Channel_Consent__c) record for the program that the care plan is enrolled under.

Warning

For information on how to configure the icon next to the title or the data in the rows, reference the Configuration section below. The columns in the component cannot be configured.

User input form

The input form in which users create and edit Contact Information records is managed separately from the Contact Information component and renders differently depending on whether or not the Google address search integration is enabled.

If the integration is not enabled, then a lightning-record-edit-form is used to dynamically render and pre-populate fields based on the given Contact Information record type. However, if the integration is enabled, then the mvn:pjnContactInformationEdit Lightning Web Component is used instead. With the component, the fields and layout are hardcoded to ensure that the data returned from Google's APIs map to the correct fields.

Google Address Search field in Contact Information input form.

Warning

The fields marked as required in the New Account modal via the New Contact Info Fields Setting (mvn__PJN_New_Contact_Info_Fields_Setting__mdt) custom metadata type are not also marked as required in the input form. To require certain fields when users create new and modify existing Contact Information records via the Contact Information component, you must configure the relevant page layout(s):

  1. Navigate to the page layout of the desired Contact Information record type.

  2. Edit the properties of the field that must be required. The Field Properties modal will appear.

  3. Check Required.

  4. Click Ok. The Field Properties modal will close.

  5. Click Save or Quick Save.

Configuration

While you cannot configure the columns in the Contact Information component or the user input form, you can configure the icon that appears next to the title of the component as well as the Account record whose Contact Information records are shown as rows in the component.

Icon

To configure the icon that appears to the left of the title in the component:

  1. Open the Contact Information component in the Lightning App Builder.

  2. On the Icon Name field, enter the name of the desired Salesforce Lightning Design System icon. The format is <category:<icon_name>, such as the default value of custom:custom78.

  3. On the Icon Size field, enter the desired size for the icon. Possible values include:

    • x-small

    • small

    • medium

    • large

    • x-large

  4. Click Save.

Account record

By default, the Contact Information component shows the Contact Information records of the Account record for which the component is directly on or related to. For example, on the Account record page, the component shows the contact information of the current account. Similarly, on the Care Plan record page, the component shows the contact information of the patient on the care plan.

There may be scenarios, however, where users may want to view the contact information of another account on a care plan, such as a patient's caregiver if the patient is a minor, if the patient has not consented, or if the patient has delegated a Power of Attorney. You can configure the Contact Information component on Case record pages so that it retrieves the Contact Information records of any Account record related to the care plan.

To change the account whose contact information appears in the component on Case record pages:

  1. Open the Contact Information component in the Lightning App Builder.

  2. On the Care Plan Account Field field, enter the API name of the Case field that relates to an Account record. For example, you may enter:

    • AccountId to retrieve the patient's contact information, as the component does by default;

    • mvn__PJN_Caregiver__c to retrieve the patient's caregiver's contact information; or

    • the API name of a custom formula field that contains more complex logic for determining which account to retrieve the contact information from.

    If the Care Plan Account Field field is left empty or returns a null value, the Contact Information component will retrieve the patient's contact information by default.

    Note

    The Care Plan Account Field field will not affect the Contact Information component on Account record pages; the Contact Information component on Account record pages will always show the contact information of the current account, even if the Care Plan Account Field field is populated.

  3. Click Save.

Any contact information that is subsequently added to or deleted from the component will affect the updated account, not the default account.

Data security

Data submitted through the Contact Information component and input form are particularly sensitive with personally identifiable information (PII). To encrypt the values of address, email, fax, and phone records while maintaining the presentation of the values in the component, the Contact Information - PJN Before Create Update flow transforms and stamps all data to the Value (mvn__PJN_Value__c) field which can then be encrypted with Salesforce Shield Platform Encryption.

Flow designed to format contact information values and stamp them to the mvn__PJN_Value__c field