Out of the box, Record Name on each object is an Auto-Number field, which may not be the most user-friendly field to display for Users navigating the system.
For example, from the Account page, the Related record tab will show all records related to the Account. However, the Record Name does not intuitively provide the User with any useful data about the record. Here is what those Record Names look like out-of-the-box:
By contrast, using a custom Formula Hyperlink field and setting the Label for the hyperlink within the formula will provide a more intuitive and user-friendly experience:
Follow along with this Article to learn how to create these fields...
Step 1: Create Custom Formula Fields
First, we will create formula fields on each Object to combine multiple fields of data and display it as the clickable link. We will do this by related lists, compact layouts, search layouts, and list views, updating this field as the first field visible.
Navigate to Setup
Go to the Object Manager
On the Address object for example, create a new Custom Formula field with a Text output. We want to combine the fields for Street Address, City, State and Zip/Postal Code so that this data is a clickable link and the first field visible in the List View or Related List. Here is an example:
To use this same formula, copy and paste the following:
HYPERLINK( '/lightning/r/' + Id + '/view', i360core__Street_Address__c & ", " & i360core__City__c & ", " & i360core__State_Province__c & " " & i360core__Zip_Postal_Code__c, '_self' )
On the Sales Appointment object we created a Formula Text field to combine the Contact Name, Appointment Date, the word "at" then the Appointment Time and the Product Categories.
If you would like to re-use this formula, simply copy and paste the following:
HYPERLINK( '/lightning/r/' + Id + '/view',
i360core__Contact_Name__c & " - " &
TEXT(MONTH(DATEVALUE(i360core__Appointment_Date_Time__c))) & "/" &
TEXT(DAY(DATEVALUE(i360core__Appointment_Date_Time__c))) & "/" &
TEXT(YEAR(DATEVALUE(i360core__Appointment_Date_Time__c))) & ", " &
IF(VALUE(MID(TEXT(i360core__Appointment_Date_Time__c), 12, 2)) > 12,
TEXT(VALUE(MID(TEXT(i360core__Appointment_Date_Time__c), 12, 2)) - 12),
MID(TEXT(i360core__Appointment_Date_Time__c), 12, 2)
) &
":" & MID(TEXT(i360core__Appointment_Date_Time__c), 15, 2) &
IF(VALUE(MID(TEXT(i360core__Appointment_Date_Time__c), 12, 2)) >= 12, " PM", " AM") &
" - " & i360core__Product_Categories__c,
'_self' )
On the Sales Opportunity object we created a Formula Text field to combine the Product Category of Interest, the Lead Source's Source Type and the Result value.
If you would like to re-use this formula, simply copy and paste the following:
HYPERLINK(
'/lightning/r/' + Id + '/view',
TEXT(i360core__Interested_In__c) & " [" &
TEXT(i360core__Lead_Source__r.i360core__Source_Type__c) & "] " &
"[" & TEXT(i360core__Result__c) & "]",
'_self'
)
On the Project object we created a Formula Text field to combine the Product Start Date, the Product Categories and the Project Status. Note: This Formula you cannot simply copy and paste. You will need to modify the sections highlighted to the Product Category values for your instance of improveit 360.
Here is the formula for this example:
HYPERLINK(
'/lightning/r/' + Id + '/view',
TEXT(MONTH(i360core__Start_Date__c)) & "/" &
TEXT(DAY(i360core__Start_Date__c)) & "/" &
TEXT(YEAR(i360core__Start_Date__c)) & " - " &
IF(INCLUDES(i360core__Product_Categories__c, "Exterior - Commercial"), "Exterior - Commercial",
IF(INCLUDES(i360core__Product_Categories__c, "Exterior - Non-Profit"), "Exterior - Non-Profit",
IF(INCLUDES(i360core__Product_Categories__c, "Exterior - Residential"), "Exterior - Residential",
IF(INCLUDES(i360core__Product_Categories__c, "Interior - Commercial"), "Interior - Commercial",
IF(INCLUDES(i360core__Product_Categories__c, "Interior - Non-Profit"), "Interior - Non-Profit",
IF(INCLUDES(i360core__Product_Categories__c, "Interior - Residential"), "Interior - Residential",
IF(INCLUDES(i360core__Product_Categories__c, "Warranty"), "Warranty", "Other"))))))) &
" [" & TEXT(i360core__Status__c) & "] ", '_self' )
Next, we'll need to adjust Page Layouts and List Views to replace the old Name field with the new Formula fields you've just created.
Step 2: Add Custom Fields to Page Layout Related Lists
In this example, we will change these fields on the Account Page Layout.
Go back to the Object Manager
Go to the Account object and go to Page Layouts, select the Page Layout used for the Customer Record Type.
Scroll down to the Related Lists section and go to the Object you've just added a Custom Field, in this example I'll edit the Address related list by clicking the Wrench icon.
Move your newly created Custom Field to the Select Fields and move it to the TOP.
This will ensure the field is clickable. Click OK when finished.
Click the Wrench Icon for all Related Lists on the Account page in which you want to add your new Custom Field to the Related List.
When finished, be sure to Save the changes you've made to the Page Layout.
NOTE: You can use the logic presented in this Article to create clickable Hyperlink fields on any Object within the system.
Comments
0 comments
Article is closed for comments.