Skip to main content
Loading...

Quick Links

Abstract illustration of categorized quick links on a Salesforce Lightning page

Problem statement

Home and record pages often need a set of useful links—but not the same set everywhere. Links should group into categories, support collapse/expand, mix static and dynamic URLs, and stay fully admin-configurable without code changes.

Solution

A custom object Custom_Link__c with two record types drives a Lightning component.

Category

Grouping records:

  • Label__c – category title
  • Description__c – optional detail
  • Order__c – display order
  • Collapsed__c – start collapsed (true) or expanded (false)
  • IsActive__c – inactive categories (and their children) stay hidden

Custom Link

Clickable items under a category:

  • Label and Description__c
  • Category__c / Category_Name__c – parent category
  • Link__c – destination URL
  • Location__c – where it appears (Home, Opportunity Detail, etc.; extend via picklist)
  • Order__c and IsActive__c

QuickLinksComp

A design attribute Location mirrors Location__c. Set it to match the page you place the component on. The component loads active links whose parent category is also active and builds the UI from that configuration.

Examples

Category and Custom Link configuration
Component configuration on a Lightning page
Quick Links on Home and Opportunity pages

Resources

  • Apex: QuickLinksCompCtrl, QuickLinksCompCtrl_Test, QuickLinksPicklistCtrl, QuickLinksPicklistCtrl_Test
  • Lightning: QuickLinksComp
  • Object: Custom_Link__c (Category and Custom_Link record types)
  • List views: AllCategories, AllCustom_Links

Pre-deployment steps

  • Back up the target org and avoid blind overwrites.
  • This package depends on Base Component and Dynamic Code Execution—install them first, or remove those references from the code.

Deployment steps

Source: quick-links

Post-deployment steps

  1. Deploy to the target org
  2. Assign object/field permissions and FLS
  3. Grant access to the component controller
  4. Create Category and Custom Link records
  5. Add QuickLinksComp to Lightning pages with the correct Location