A reusable Lightning Web Component that renders a configurable button and navigates users to different destinations in Salesforce.
- Navigate to custom or standard tabs
- Open object home pages or list views
- Open specific Reports
- Open specific Dashboards
- Optional icon support
- Admin-friendly configuration via Lightning App Builder
| Type | Description |
|---|---|
| tab | Custom or standard navigation tab |
| object | Object home or list view |
| report | Specific report |
| dashboard | Specific dashboard |
- Button Label – Text shown on the button
- Icon Name (optional) – SLDS icon name (e.g.
utility:chart) - Navigation Type –
tab,object,report,dashboard
- Target Tab API Name – API name of the tab
- Object API Name – e.g.
Account - List View Developer Name (optional) – e.g.
My_Open_Opportunities
- Target Record Id
- Report Id starts with
00O - Dashboard Id starts with
01Z
- Report Id starts with
- List view navigation uses DeveloperName, not Id
- Report and dashboard navigation uses Lightning URLs
- User permissions are respected automatically
- Salesforce CLI (
sf) installed - An authenticated Salesforce org
sf org login web
sf project deploy start --source-dir force-app/main/default/lwc/dynamicNavButton
📘 This project accompanies the blog post
How I Replaced Cluttered Tabs with a Single Dynamic Button in Salesforce
MIT License