Wednesday, July 8, 2026

LWC - Dependent Picklist Pair

🔗 Reusable Dependent Picklist Pair for Salesforce LWC

A reusable Lightning Web Component that automatically handles Salesforce dependent picklists with dynamic metadata, validation, accessibility, configurable labels, and zero Apex.

📖 Project Overview

Dependent Picklist Pair is a reusable Lightning Web Component designed to simplify one of the most common Salesforce UI requirements—displaying dependent picklists.

Instead of manually querying metadata, decoding validFor values, or maintaining custom mappings, this component leverages Salesforce Lightning UI APIs to automatically retrieve controlling and dependent picklist values while keeping both dropdowns synchronized.

The component is completely reusable and works with any standard or custom object supporting dependent picklists, making it an excellent building block for enterprise Lightning applications.

✨ Key Features

Feature Description
Native Salesforce MetadataUses Lightning UI API to retrieve picklist values without Apex.
Automatic Dependency HandlingDisplays only valid dependent values based on the selected controlling value.
Reusable DesignWorks with any standard or custom object that supports dependent picklists.
Configurable LabelsSupports custom labels, placeholders, and required indicators.
Programmatic APIExpose values, reset selections, and trigger validation from parent components.
Built-in ValidationUses native Lightning input validation with reportValidity().
Reactive UpdatesDependent values refresh instantly whenever the controlling value changes.
Zero ApexNo custom Apex controllers or SOQL required.
SLDS ReadyFully aligned with Salesforce Lightning Design System.
AccessibilityKeyboard-friendly and screen-reader compatible.

🏗 Component Architecture

LWC - Dependent Picklist Pair

📁 Project Structure

force-app/
└── main/
    └── default/
        └── lwc/
            ├── dependentPicklistPair/
            │   ├── dependentPicklistPair.html
            │   ├── dependentPicklistPair.js
            │   ├── dependentPicklistPair.css
            │   └── dependentPicklistPair.js-meta.xml
            │
            └── dependentPicklistDemo/

⚙️ Public API

Property Description
objectApiNameSalesforce object API name.
recordTypeIdRecord Type used for metadata retrieval.
controllingFieldApiNameAPI name of the controlling picklist.
dependentFieldApiNameAPI name of the dependent picklist.
requiredMarks both fields as mandatory.
disabledDisables user interaction.

🔄 Component Workflow

Load Component
      │
      ▼
Retrieve Object Metadata
      │
      ▼
Load Picklist Values
      │
      ▼
Render Controlling Picklist
      │
      ▼
User Selects Value
      │
      ▼
Filter Valid Dependent Values
      │
      ▼
Render Updated Dependent Picklist

🛠 Public Methods

  • getValue() — Returns current controlling and dependent selections.
  • setValue() — Programmatically update selected values.
  • reset() — Clears both picklists.
  • reportValidity() — Executes Lightning validation.
  • focus() — Moves focus to the controlling picklist.

🎯 Business Use Cases

  • Account Address Forms
  • Lead Qualification
  • Case Classification
  • Product Configuration
  • Service Request Forms
  • Opportunity Management
  • Experience Cloud Registration
  • Dynamic Record Creation Wizards
  • Reusable Enterprise Form Libraries

♿ Accessibility

  • Keyboard navigation support.
  • Native Lightning validation.
  • Screen-reader compatible.
  • SLDS-compliant styling.
  • Responsive layout.

🚀 Deployment

sf org login web --alias myOrg

sf project deploy start \
--source-dir force-app \
--target-org myOrg

📌 Conclusion

The Dependent Picklist Pair component offers a clean, reusable, and metadata-driven approach to implementing dependent picklists in Salesforce. By leveraging the Lightning UI API, it eliminates the need for Apex, automatically synchronizes controlling and dependent values, and provides a flexible API that can be reused across forms, record pages, Experience Cloud sites, and enterprise Lightning applications.

Tuesday, July 7, 2026

LWC - Multi-Step Wizard

🧭 Multi-Step Wizard – Reusable Salesforce LWC

A reusable, slot-based Lightning Web Component that simplifies building multi-step forms with progress indicators, validation, navigation controls, review pages, and an imperative API—all using native Salesforce Lightning Web Components.

📖 Project Overview

Multi-Step Wizard is a production-ready Lightning Web Component that provides a complete wizard framework for Salesforce applications. Instead of building step navigation and validation logic repeatedly, developers simply define the steps and provide their own form fields while the component manages the workflow.

The wizard is completely domain-agnostic, making it suitable for any business process including record creation, onboarding, registration forms, approval workflows, surveys, checkout experiences, and guided configuration screens.

Built using native Lightning Web Components, the solution includes configurable progress indicators, automatic per-step validation, review pages, reusable step wrappers, and a clean JavaScript API for complete programmatic control.

✨ Key Features

Feature Description
Progress IndicatorSupports both Base (numbered) and Path (chevron) progress styles.
Step ValidationAutomatically validates inputs exposing reportValidity() before advancing.
Back & Next NavigationBuilt-in Previous, Next and Finish buttons.
Review StepCreate a final confirmation page before submission.
Slot-Based DesignEmbed any Lightning components or HTML inside wizard steps.
Imperative APIIncludes next(), previous(), goToStep(), reset() and reportValidity().
Custom EventsDispatches stepchange and complete events.
ReusableWorks with any Salesforce object or business process.

🏗 Component Architecture

Multi-Step Wizard — Reusable Lightning Web Component

📁 Project Structure

force-app/main/default/
│
├── classes
│   ├── WizardController.cls
│   └── WizardControllerTest.cls
│
└── lwc
    ├── multiStepWizard
    ├── wizardStep
    └── wizardDemo

⚙️ Component Attributes

Attribute Purpose
progress-typeChoose base or path progress indicator.
hide-progress-indicatorHide the step indicator.
hide-footerHide built-in navigation buttons.
allow-step-navigationAllow users to revisit completed steps.
previous-labelCustom Previous button text.
next-labelCustom Next button text.
finish-labelCustom Finish button text.

🛠 Imperative API

  • next() — Validate current step and move forward.
  • previous() — Navigate to the previous step.
  • goToStep(name) — Jump directly to a named step.
  • reset() — Reset the wizard to the first step.
  • reportValidity() — Trigger validation for the active step.

📡 Events

Event Description
stepchangeRaised whenever the active wizard step changes.
completeRaised after the user finishes the final step.

🔄 Wizard Flow

Start Wizard
      │
      ▼
Step 1
      │
Validate
      ▼
Step 2
      │
Validate
      ▼
Step 3
      │
      ▼
Review
      │
      ▼
Complete Event
      │
      ▼
Save Business Data

🎯 Business Use Cases

  • Customer Registration
  • Lead Qualification
  • Contact Creation
  • Employee Onboarding
  • Insurance Applications
  • Loan Processing
  • Case Intake Forms
  • Checkout & Payment Flows
  • Approval Processes
  • Survey Applications

🚀 Deployment

sf org login web --alias myOrg

sf project deploy start \
--source-dir force-app \
--target-org myOrg

sf apex run test \
--class-names WizardControllerTest

📌 Conclusion

The Multi-Step Wizard provides a clean, reusable foundation for creating guided user experiences in Salesforce. With configurable progress indicators, automatic validation, slot-based content, review screens, an imperative JavaScript API, and custom events, it enables developers to build scalable wizard-driven applications while keeping business logic separate from navigation and presentation.

Monday, July 6, 2026

LWC - Paginated Data Table

📋 Paginated Data Table – Reusable Salesforce LWC

A reusable Lightning Web Component built on lightning-datatable that adds server-side sorting, pagination controls, row selection, loading states, and complete backend independence.

📖 Project Overview

Paginated Data Table is a fully controlled Salesforce Lightning Web Component that extends the standard lightning-datatable with enterprise-ready pagination and sorting capabilities.

Unlike traditional datatable implementations, this component never performs data retrieval itself. Instead, it simply renders the current page of data and communicates user actions back to the parent component using custom events. This makes it reusable with Apex, REST APIs, GraphQL services, wired adapters, or even static datasets.

The repository also includes a complete demo implementation powered by Apex using secure SOQL queries with WITH SECURITY_ENFORCED.

✨ Features

Feature Description
Server-side SortingFires sort events instead of sorting locally, allowing Apex or external services to perform sorting.
Pagination ControlsFirst, Previous, Next, Last navigation with configurable page size.
Row SelectionSupports standard lightning-datatable row selection events.
Row ActionsFully compatible with Edit, Delete and custom row action menus.
Loading StateBuilt-in spinner overlay while data is loading.
Error HandlingDisplays configurable error banners for backend failures.
Empty StateShows custom messages when no records are available.
Imperative APIProvides getSelectedRows() for parent components.
Backend AgnosticWorks with Apex, REST APIs, GraphQL or static arrays.

🏗 Component Architecture

Salesforce-Paginated-Data-Table-Reusable

📁 Project Structure

force-app
│
├── classes
│   ├── PaginatedTableController.cls
│   └── PaginatedTableControllerTest.cls
│
├── lwc
│   ├── paginatedDataTable
│   └── paginatedDataTableDemo
│
└── README.md

⚙️ Public API

Property Purpose
columnsColumn configuration for the datatable.
dataCurrent page records.
totalRecordsTotal number of available records.
pageSizeRecords displayed per page.
currentPageCurrent active page.
sortedByCurrent sorted field.
sortedDirectionAscending or Descending order.
isLoadingDisplays loading spinner.

🔄 User Workflow

Load Page
    │
    ▼
Parent Fetches Records
    │
    ▼
Render Current Page
    │
    ▼
User Sorts Column
    │
    ▼
Sort Event Fired
    │
    ▼
Parent Retrieves Data
    │
    ▼
Refresh Table

📡 Supported Events

  • sort — User changes column sorting.
  • pagechange — User navigates between pages.
  • rowselection — Selected rows change.
  • rowaction — Standard row actions.

🎯 Business Use Cases

  • Large Contact Lists
  • Opportunity Management
  • Account Dashboards
  • Service Case Management
  • Lead Administration
  • Experience Cloud Data Tables
  • External REST Data
  • Enterprise Reporting Dashboards

🔒 Security

  • Supports Salesforce CRUD/FLS.
  • Uses WITH SECURITY_ENFORCED in Apex demo.
  • Backend-independent architecture.
  • Compatible with enterprise security best practices.

🚀 Deployment

sf org login web --alias my-org

sf project deploy start \
--source-dir force-app \
--target-org my-org

sf apex run test \
--class-names PaginatedTableControllerTest

📌 Conclusion

Paginated Data Table is a lightweight, reusable, and enterprise-ready Lightning Web Component that extends the standard Salesforce datatable with server-side pagination, sorting, row selection, and configurable states. By separating presentation from data retrieval, it can be seamlessly integrated with Apex controllers, REST services, GraphQL APIs, or any custom backend while remaining highly reusable across Salesforce applications.

Saturday, July 4, 2026

LWC: Reusable Dynamic Tabs

🗂️ Dynamic Tabs – Reusable Salesforce LWC Component

A production-ready Lightning Web Component that delivers fully accessible, highly configurable dynamic tabs with lazy loading, badge counts, SLDS icons, keyboard navigation, and closeable tabs—all built using native Salesforce Lightning Web Components.

📖 Project Overview

Dynamic Tabs is a reusable Lightning Web Component designed for modern Salesforce applications that require rich tabbed navigation while maintaining excellent performance and accessibility.

Unlike traditional tab implementations that render every panel immediately, this component supports lazy loading, meaning tab content is rendered only when a user opens it for the first time. After the initial load, content is simply shown or hidden without unnecessary re-rendering.

The component also includes badge counters, SLDS icons, closeable tabs, multiple layout variants, keyboard accessibility, and a clean public API that makes it easy to integrate into enterprise Salesforce applications.

✨ Features

Feature Description
Lazy LoadingTab content loads only when activated for the first time.
Badge CountsDisplays per-tab counters with automatic 99+ overflow handling.
SLDS IconsSupports any Salesforce Lightning icon beside the tab label.
Closeable TabsOptional close button with custom tabclose event.
Keyboard NavigationSupports Left, Right, Home and End keyboard shortcuts.
AccessibilityARIA-compliant implementation using tablist, tab and tabpanel roles.
Multiple VariantsSupports Default, Scoped and Vertical SLDS tab layouts.
Programmatic APISwitch tabs and update badge counts directly from JavaScript.
Reusable DesignCan be embedded into any Lightning page or custom component.

🏗 Component Architecture

LWC Reusable Dynamic Tabs

📁 Project Structure

force-app/
└── main/
    └── default/
        └── lwc/
            ├── dynamicTabs/
            │   ├── dynamicTabs.html
            │   ├── dynamicTabs.js
            │   ├── dynamicTabs.css
            │   └── dynamicTabs.js-meta.xml
            │
            ├── dynamicTabPanel/
            │   ├── dynamicTabPanel.html
            │   ├── dynamicTabPanel.js
            │   └── dynamicTabPanel.css
            │
            └── dynamicTabsDemo/

⚙️ Public API

Property / Method Purpose
variantChoose default, scoped, or vertical layout.
defaultTabAutomatically activate a tab on initial render.
switchTab()Programmatically activate any tab.
updateBadge()Update badge counts dynamically.
activeTabReturns the currently active tab.

🔄 Component Workflow

Page Loads
     │
     ▼
Render Tab Navigation
     │
     ▼
Activate Default Tab
     │
     ▼
Lazy Load Panel
     │
     ▼
User Switches Tabs
     │
     ▼
Previously Loaded?
     │
 ┌───┴────┐
 │        │
Yes      No
 │        │
 ▼        ▼
Show     Render Once
Content   Then Cache

⌨️ Keyboard Accessibility

  • ← Move to previous tab
  • → Move to next tab
  • Home jumps to the first tab
  • End jumps to the last tab
  • Fully ARIA-compliant tab navigation
  • Screen reader friendly implementation

🎨 Supported Variants

Variant Description
DefaultStandard Salesforce horizontal tabs.
ScopedSLDS scoped tab style.
VerticalVertical navigation for dashboards and setup pages.

🚀 Deployment

sf org login web --alias myOrg

sf project deploy start \
--source-dir force-app \
--target-org myOrg

🎯 Business Use Cases

  • Account & Contact workspaces
  • Customer Service Consoles
  • Sales dashboards
  • Experience Cloud portals
  • Admin configuration pages
  • Record detail workspaces
  • Multi-step business applications
  • Reusable enterprise component libraries

📌 Conclusion

The Dynamic Tabs component provides a powerful, enterprise-ready tab navigation experience for Salesforce applications. With lazy loading, badge counters, SLDS integration, keyboard accessibility, multiple layout variants, and a clean programmatic API, it enables developers to build scalable, high-performance Lightning applications while delivering an excellent user experience.

Thursday, July 2, 2026

LWC: Reusable Horizontal Bar Chart

📊 Reusable Horizontal Bar Chart for Salesforce LWC

A modern, reusable Lightning Web Component that renders responsive horizontal bar charts with smooth animations, adaptive labels, click-to-filter functionality, and zero third-party JavaScript libraries.

📖 Project Overview

horizontalBarChart is a fully reusable Salesforce Lightning Web Component designed for dashboards, Home Pages, App Pages, and Experience Cloud sites.

The component accepts a simple collection of { id, label, value } objects and automatically renders an attractive horizontal bar chart using native HTML, CSS and Lightning Web Components.

Built without Chart.js, D3.js, or any external dependency, the component offers excellent performance, smooth animations, accessibility, responsive layouts, configurable colors, interactive filtering, and App Builder support.

✨ Features

Feature Description
Animated EntryBars animate smoothly from 0% to their calculated width whenever data changes.
Adaptive LabelsAutomatically positions values inside or outside the bar based on available space.
Click-to-FilterClicking a bar selects it and fires a custom barclick event.
Toggle SelectionClick again to remove the active filter.
Clear Filter ButtonDisplays automatically whenever a filter is active.
External SelectionParent components can control selection using the selectedId property.
Automatic ScalingCalculates maximum value automatically or accepts a custom maxValue.
Large Number FormattingFormats values such as 45K, 1.2M, etc.
Custom ColorsSupports reusable color palettes that cycle automatically.
Legend SupportOptional color legend for dashboard visualization.
Responsive LayoutOptimized for desktop, tablet and mobile devices.
AccessibilityKeyboard navigation, ARIA labels and screen-reader support.

🏗 Component Architecture

Reusable Horizontal Bar Chart

📁 Project Structure

horizontalBarChart/
│
├── horizontalBarChart.html
├── horizontalBarChart.js
├── horizontalBarChart.css
├── horizontalBarChart.js-meta.xml
└── README.md

⚙️ Public API

Property Purpose
dataArray of { id, label, value } objects.
selectedIdExternally control selected bar.
maxValueOverride automatic scaling.
showLegendShow or hide legend.
colorsCustom color palette.

📦 Expected Data Structure

[
  {
    id: "A",
    label: "Prospecting",
    value: 120
  },
  {
    id: "B",
    label: "Qualification",
    value: 85
  },
  {
    id: "C",
    label: "Closed Won",
    value: 42
  }
]

🔄 Event Flow

Load Data
    │
    ▼
Calculate Maximum
    │
    ▼
Render Horizontal Bars
    │
    ▼
Animate Width
    │
    ▼
User Clicks Bar
    │
    ▼
Dispatch "barclick"
    │
    ▼
Parent Dashboard Filters

🎨 Styling Features

  • Salesforce Lightning Design System (SLDS) styling.
  • Uses Lightning Design Tokens.
  • Responsive layout.
  • Animated transitions.
  • Adaptive value labels.
  • Optional legend.
  • Empty state illustration.
  • Theme-friendly custom CSS variables.

♿ Accessibility

  • Keyboard accessible.
  • ARIA-compliant buttons.
  • Screen reader labels.
  • role="button" support.
  • aria-pressed state management.
  • Focus indicators.

🚀 Deployment

sf org login web --alias myOrg

sf project deploy start \
--source-dir force-app \
--target-org myOrg

🎯 Ideal Business Use Cases

  • Opportunity Stage Dashboard
  • Lead Source Analytics
  • Case Status Distribution
  • Revenue Comparison
  • Sales Team Performance
  • Service Metrics
  • Executive KPI Dashboards
  • Experience Cloud Analytics
  • Marketing Campaign Performance
  • Custom Salesforce Reports

📌 Conclusion

The Horizontal Bar Chart component provides an elegant, lightweight, and highly reusable solution for visualizing Salesforce data. Built entirely with Lightning Web Components and native web technologies, it offers smooth animations, adaptive labels, interactive filtering, responsive layouts, accessibility support, and App Builder compatibility—making it an excellent choice for modern Salesforce dashboards and analytics applications.

Tuesday, June 30, 2026

LWC: Reusable Donut / Pie Chart Component

🍩 Reusable Donut / Pie Chart Component for Salesforce LWC

A fully reusable SVG-based Lightning Web Component that renders beautiful, interactive Donut and Pie Charts using pure SVG with zero external JavaScript libraries.

📖 Project Overview

The Donut / Pie Chart Component is a reusable Lightning Web Component built entirely with native Salesforce technologies. It renders interactive charts using pure SVG, supports Apex-powered dynamic data as well as static datasets, and provides configurable legends, animated slices, hover tooltips, accessibility support, and responsive layouts.

Unlike third-party charting libraries, this solution requires zero external dependencies, making deployment simple while maintaining excellent performance and Lightning compatibility.

✨ Key Features

Feature Description
Pure SVG RenderingNo Canvas or third-party chart libraries required.
Donut & Pie ModesSwitch between Donut and Pie using a single property.
Animated SlicesHovered slices expand while remaining slices fade.
Interactive TooltipsDisplays label, value, and percentage on hover.
Configurable LegendSupports stacked and side-by-side layouts.
Dynamic Apex DataAutomatically loads data using Apex Wire.
Static Data SupportAccepts custom chart data from parent components.
Responsive LayoutAutomatically adapts to desktop and mobile screens.
AccessibilityKeyboard navigation, ARIA labels and focus support.
Loading & Error StatesBuilt-in loading, empty data and error handling.

🏗 Component Architecture

Donut Chart - LWC Component Architecture

📁 Project Structure

force-app
└── main
    └── default
        ├── classes
        │   └── DonutChartController.cls
        │
        └── lwc
            └── donutChart
                ├── donutChart.html
                ├── donutChart.js
                ├── donutChart.css
                └── donutChart.js-meta.xml

⚙️ Public API Properties

Property Purpose
titleChart title displayed above the component.
chartTypeChoose between donut or pie.
chartDataStatic chart data supplied by parent LWC.
recordIdAutomatically loads Apex data.
colorPaletteCustom array of chart colors.
showLegendDisplay chart legend.
legendPositionStacked or Side-by-Side layout.
showCenterTextDisplay total value inside the donut.
valuePrefix / valueSuffixFormat displayed values.

💻 Usage Example

<c-donut-chart
    title="Revenue by Stage"
    chart-type="donut"
    show-legend
    legend-position="side-by-side"
    show-center-text
    center-label="Total"
    value-prefix="$"
    chart-data={opportunityData}>
</c-donut-chart>

📊 Supported Features

  • Donut Charts
  • Pie Charts
  • Static Data
  • Apex Wire Data
  • Hover Animation
  • Keyboard Navigation
  • ARIA Accessibility
  • Responsive Layout
  • Custom Color Palette
  • Legend Totals
  • Loading State
  • Error State
  • Empty Data State

🎨 Customisation Options

✔ Custom Color Palette

✔ Legend Title

✔ Legend Position

✔ Center Label

✔ Value Prefix

✔ Value Suffix

✔ Label Field Mapping

✔ Value Field Mapping

✔ Donut / Pie Mode

♿ Accessibility

  • Keyboard accessible slices.
  • Tab navigation support.
  • Meaningful ARIA labels.
  • Screen reader friendly.
  • High contrast compatible.
  • Mobile responsive layout.

🚀 Deployment

sf org login web --alias myOrg

sf project deploy start \
--source-dir force-app \
--target-org myOrg

🎯 Business Use Cases

  • Sales Pipeline Distribution
  • Opportunity Stage Analysis
  • Case Status Dashboard
  • Lead Source Analytics
  • Revenue Breakdown
  • Account Segmentation
  • Executive Dashboards
  • Service Performance Reports
  • Custom CRM Analytics

📌 Conclusion

The Reusable Donut / Pie Chart Component provides a lightweight, modern, and highly configurable visualization solution for Salesforce Lightning applications. Built entirely with native SVG, Lightning Web Components, and Apex, it delivers interactive charts without relying on external JavaScript libraries, making it ideal for enterprise Salesforce projects that require performance, accessibility, and easy customization.

Monday, June 29, 2026

LWC: Scheduled Job Monitor

⏰ Scheduled Job Monitor for Salesforce LWC

Monitor, manage, and analyze Salesforce Scheduled Apex Jobs directly from Lightning Experience with a modern reusable Lightning Web Component.

📖 Project Overview

Scheduled Job Monitor is a reusable Lightning Web Component that provides administrators and developers with a centralized dashboard for monitoring Salesforce Scheduled Apex Jobs.

Instead of navigating through Salesforce Setup pages, users can view scheduled jobs, inspect execution details, monitor upcoming schedules, abort running jobs, refresh data, search jobs, and analyze execution status directly from Lightning Experience.

The solution is built using Lightning Web Components, Apex, and Salesforce CronTrigger APIs while following Salesforce security best practices.

✨ Key Features

Feature Description
Scheduled Job Dashboard View all scheduled Apex jobs from a single Lightning page.
Real-Time Refresh Reload latest job information without leaving the page.
Search Jobs Quickly locate scheduled jobs by name.
Status Monitoring Track Waiting, Acquired, Executing, Complete, Error and Deleted jobs.
Abort Scheduled Jobs Cancel scheduled jobs directly from Lightning.
Execution Details Display next execution time, previous execution and schedule information.
Toast Notifications Success and error messages for all operations.
Responsive Design Works across desktop and tablet Lightning Experience.

🏗 Solution Architecture

Scheduled Job Monitor Architecture

📁 Project Structure

force-app
└── main
    └── default
        ├── classes
        │   ├── ScheduledJobMonitorController.cls
        │   └── ScheduledJobMonitorControllerTest.cls
        │
        ├── lwc
        │   └── scheduledJobMonitor
        │       ├── scheduledJobMonitor.html
        │       ├── scheduledJobMonitor.js
        │       ├── scheduledJobMonitor.css
        │       └── scheduledJobMonitor.js-meta.xml
        │
        └── permissionsets
            └── ScheduledJobMonitor.permissionset-meta.xml

⚙️ Dashboard Information

Column Description
Job NameScheduled Apex class name.
StateCurrent execution status.
Cron ExpressionComplete scheduling expression.
Next Fire TimeNext scheduled execution.
Previous Fire TimeLast successful execution.
Times TriggeredExecution count.
ActionsAbort and refresh operations.

🔄 Monitoring Workflow

Load Dashboard
      │
      ▼
Retrieve CronTrigger Records
      │
      ▼
Display Scheduled Jobs
      │
      ▼
Search / Filter Jobs
      │
      ▼
Review Execution Details
      │
      ▼
Abort Job (Optional)
      │
      ▼
Refresh Dashboard

📊 Supported Job States

WAITING
ACQUIRED
EXECUTING
COMPLETE
ERROR
DELETED

🔒 Security

  • Uses with sharing Apex controllers.
  • Supports Salesforce CRUD and Field-Level Security.
  • Respects user permissions while displaying scheduled jobs.
  • Permission Set included for easy deployment.
  • Native Salesforce scheduler APIs used without external integrations.

🚀 Deployment

sf org login web --alias myOrg

sf project deploy start \
--source-dir force-app \
--target-org myOrg

sf org assign permset \
--name ScheduledJobMonitor

sf apex run test \
--class-names ScheduledJobMonitorControllerTest

🎯 Business Benefits

  • Eliminates navigation to Salesforce Setup.
  • Provides centralized scheduled job monitoring.
  • Improves administrator productivity.
  • Quickly identifies failed or inactive jobs.
  • Supports one-click job cancellation.
  • Reusable across multiple Salesforce organizations.
  • Modern Lightning user experience.

📌 Conclusion

The Scheduled Job Monitor provides Salesforce administrators and developers with a simple yet powerful interface for managing Scheduled Apex Jobs. By combining Lightning Web Components, Apex, and Salesforce scheduling APIs, the solution delivers real-time visibility into scheduled processes while simplifying monitoring and administration from within Lightning Experience.

Sunday, June 28, 2026

LWC: PDF Generator Button

📄 PDF Generator Button for Salesforce LWC

Generate professional PDF documents from any Salesforce record with a single click, automatically save them as Salesforce Files, and maintain a complete PDF history.

📖 Project Overview

PDF Generator Button is a reusable Lightning Web Component that enables users to generate PDF documents directly from Salesforce record pages.

The component renders a configurable Visualforce page as a PDF, stores it as a Salesforce File (ContentVersion), automatically links it back to the source record, and displays recently generated PDFs for quick access.

Designed for enterprise Salesforce applications, the solution works across standard and custom objects without requiring object-specific code.

✨ Key Features

Feature Description
One-Click PDF GenerationGenerate PDFs directly from Lightning record pages.
Reusable Across ObjectsSupports Account, Contact, Opportunity and custom objects.
Automatic File NamingCreates descriptive file names automatically or allows a custom name.
Salesforce Files IntegrationCreates ContentVersion and ContentDocumentLink records automatically.
PDF HistoryDisplays the latest generated PDFs for each record.
Download SupportOpen or download generated PDFs directly.
Toast NotificationsInstant success and error feedback.
Configurable TemplateUse any Visualforce page as the PDF template.
Permission Set IncludedEasy deployment using the included permission set.

🏗 Architecture

PDF Generator LWC Architecture Diagram

📁 Project Structure

force-app/main/default
│
├── lwc
│   └── pdfGeneratorButton
│       ├── pdfGeneratorButton.html
│       ├── pdfGeneratorButton.js
│       ├── pdfGeneratorButton.css
│       └── pdfGeneratorButton.js-meta.xml
│
├── classes
│   ├── PdfGeneratorController.cls
│   ├── PdfGeneratorControllerTest.cls
│   ├── RecordPdfPageController.cls
│   └── RecordPdfPageControllerTest.cls
│
├── pages
│   └── RecordPdfPage.page
│
└── permissionsets
    └── PdfGenerator.permissionset-meta.xml

⚙️ Lightning App Builder Configuration

Property Default Description
buttonLabel Generate PDF Custom label displayed on the button.
vfPageName RecordPdfPage Visualforce page used to generate the PDF.
pdfFileName Auto Generated Optional static PDF filename.

🔄 PDF Generation Flow

Open Record
      │
      ▼
Click "Generate PDF"
      │
      ▼
Visualforce Page Rendered
      │
      ▼
PDF Created
      │
      ▼
ContentVersion Created
      │
      ▼
ContentDocument Linked
      │
      ▼
PDF History Refreshed

📂 Automatic File Naming

__.pdf

Example:

Account_001XXXXXXXXXXXX_2026-06-28.pdf

📜 PDF History

  • Displays the latest 20 generated PDF files.
  • Shows files linked to the current record.
  • One-click preview and download.
  • Automatically refreshes after generating a new PDF.

🧩 Custom PDF Templates

The component supports any Visualforce page as a PDF template. Simply specify the Visualforce page API name in the component configuration to generate customized invoices, quotations, certificates, reports, contracts, or business documents.

🔐 Security Features

  • Uses with sharing Apex controllers.
  • Respects Salesforce record-level security.
  • Stores documents using native Salesforce Files.
  • Supports controlled rollout through the included permission set.
  • Works with standard Salesforce authentication.

🚀 Deployment

sf org login web --alias myOrg

sf project deploy start \
--source-dir force-app \
--target-org myOrg

sf org assign permset \
--name PdfGenerator

sf apex run test \
--class-names PdfGeneratorControllerTest,RecordPdfPageControllerTest

🎯 Business Use Cases

  • Invoice Generation
  • Sales Quotations
  • Customer Agreements
  • Booking Confirmations
  • Service Reports
  • Purchase Orders
  • Certificates
  • Inspection Reports
  • Healthcare Documents
  • Custom Business Forms

📌 Conclusion

The PDF Generator Button is a reusable Salesforce Lightning Web Component that streamlines PDF creation directly from Lightning record pages. By combining Lightning Web Components, Apex, Visualforce, and Salesforce Files, it provides a simple, secure, and scalable solution for generating and managing business documents across any Salesforce object.

Thursday, June 25, 2026

LWC: Post Booking Portal

🎫 Salesforce Post Booking Portal

A complete post-booking management solution built on Salesforce that empowers customers to manage reservations, modify bookings, download invoices, request cancellations, and track booking history through a modern self-service portal.

📖 Project Overview

Salesforce Post Booking Portal extends the customer journey beyond the initial reservation process by providing a centralized self-service experience for managing existing bookings.

Customers can view upcoming reservations, update booking details, reschedule appointments, request cancellations, download invoices, track payment history, and receive automated notifications.

Built using Salesforce Lightning Web Components (LWC), Apex, Experience Cloud, Flows, Platform Events, and Custom Metadata, the solution delivers a scalable and enterprise-ready booking management platform.

🏗 Solution Architecture

Post Booking Portal Solution Architecture

✨ Key Features

Module Capabilities
Booking Dashboard View active, upcoming, completed, and cancelled bookings.
Booking Management Reschedule, modify, upgrade, or cancel reservations.
Invoice Center Download invoices, receipts, and payment confirmations.
Payment History Track completed and pending payments.
Notifications Email, SMS, and in-app booking updates.
Support Requests Raise issues and customer service requests.

🔄 Post Booking Journey

Booking Created
      │
      ▼
Confirmation Sent
      │
      ▼
Customer Portal Login
      │
      ▼
View Booking Details
      │
 ┌────┼─────┬─────┐
 ▼    ▼     ▼     ▼
Edit  Pay  Download Cancel
      │
      ▼
Notifications Triggered
      │
      ▼
Booking Updated

📁 Project Structure

force-app/main/default

├── classes
│   ├── PostBookingController.cls
│   ├── PaymentHistoryController.cls
│   ├── InvoiceController.cls
│   └── NotificationController.cls
│
├── lwc
│   ├── bookingDashboard
│   ├── bookingDetails
│   ├── bookingReschedule
│   ├── invoiceCenter
│   ├── paymentHistory
│   └── supportRequestPanel
│
├── flows
│
├── platformEvents
│
└── customMetadata

💻 LWC Components

Component Purpose
bookingDashboard Displays all customer bookings.
bookingDetails Shows booking information and status.
bookingReschedule Handles appointment or reservation changes.
invoiceCenter Invoice download and payment receipts.
paymentHistory Displays transaction history.
supportRequestPanel Customer support and issue management.

📊 Dashboard Widgets

  • Upcoming Bookings
  • Completed Reservations
  • Pending Payments
  • Recent Transactions
  • Cancellation Requests
  • Support Tickets
  • Booking Statistics
  • Customer Notifications

💳 Payment & Invoice Management

Booking
   │
   ▼
Payment Record
   │
   ▼
Invoice Generation
   │
   ▼
PDF Receipt
   │
   ▼
Email Delivery

📢 Notification Framework

  • Booking Modification Alerts
  • Cancellation Confirmations
  • Reschedule Notifications
  • Payment Success Messages
  • Refund Updates
  • Reminder Notifications
  • Support Ticket Responses

🔐 Security Features

Security Layer Implementation
Authentication Experience Cloud Login & SSO.
Authorization Role-based access control.
Data Security CRUD/FLS enforcement.
Apex Security with sharing controllers.

🚀 Deployment

sf org login web --alias booking-portal

sf project deploy start \
--source-dir force-app \
--target-org booking-portal

sf apex run test

🎯 Business Benefits

  • Reduces customer support workload.
  • Provides self-service booking management.
  • Improves customer satisfaction.
  • Automates post-booking communication.
  • Centralizes invoices and payment history.
  • Scales easily with Experience Cloud.
  • Enhances operational efficiency.

📌 Conclusion

Salesforce Post Booking Portal provides a comprehensive self-service experience for customers after a reservation has been completed. By combining Lightning Web Components, Apex, Experience Cloud, Flows, and Platform Events, organizations can deliver a seamless post-booking journey that improves customer engagement, reduces support costs, and streamlines booking operations.

Sunday, June 21, 2026

LWC: Booking Portal

📅 Salesforce Booking Portal

A complete multi-purpose booking platform built on Salesforce using Lightning Web Components, Apex, Flows, Platform Events, Stripe, PayPal, and native Salesforce automation.

📖 Project Overview

Salesforce Booking Portal is a full-featured booking management solution that covers the entire customer journey from resource discovery to reservation, payment processing, confirmation, notifications, and operational management.

The platform is designed using Salesforce native technologies including Lightning Web Components (LWC), Apex Controllers, Custom Objects, Platform Events, Flows, Named Credentials, and Custom Metadata Types.

The solution supports various booking scenarios such as rooms, appointments, seats, equipment rentals, training sessions, healthcare appointments, and service scheduling.

🏗 Solution Architecture

Booking Portal Full Architecture Diagram

✨ Key Features

Module Capabilities
Booking Engine Availability search, slot reservation, temporary holds, booking references.
Pricing Engine Dynamic pricing, surge pricing, promotions, loyalty discounts.
Payment Processing Stripe, PayPal, saved payment methods, split payments.
Confirmation Booking receipts, invoices, calendar exports.
Notifications Email, SMS, reminders, status updates.
Operations Admin dashboard, reporting, analytics, booking management.

🛒 4-Step Booking Checkout Flow

Step 1 → Select Resource & Time Slot

Step 2 → Review Pricing & Promotions

Step 3 → Enter Payment Information

Step 4 → Booking Confirmation & Invoice

📁 Project Structure

force-app/main/default

├── classes
│   ├── BookingEngineController.cls
│   ├── PricingController.cls
│   └── PaymentController.cls
│
└── lwc
    ├── bookingCheckoutStepper
    ├── resourceSelector
    ├── pricingPanel
    ├── paymentProcessor
    └── bookingConfirmation

⚙️ LWC Component Architecture

c-booking-checkout-stepper
│
├── c-resource-selector
│
├── c-pricing-panel
│
├── c-payment-processor
│
└── c-booking-confirmation

🔍 Booking Engine Features

  • Resource Type Filtering
  • Availability Search
  • Date and Time Selection
  • Party Size Management
  • Real-Time Availability Checks
  • Temporary Hold Creation
  • Automatic Hold Expiration
  • Booking Reference Generation
  • Calendar Integration
  • Invoice Generation

💰 Pricing & Promotion Engine

Base Price
   +
Surge Pricing
   +
Seasonal Adjustment
   -
Promo Discount
   -
Loyalty Discount
   +
Tax
   =
Final Total

Promotion Validation

  • Promotion must be active.
  • Current date must be within validity period.
  • Usage limit validation.
  • Minimum order amount validation.
  • Listing eligibility validation.
  • Single-use restriction validation.

💳 Payment Processing

Method Implementation
Credit/Debit Cards Stripe Payment Intents
PayPal PayPal Orders API
Saved Methods Stored payment profiles
Split Payments 2–10 participant payment sharing

📦 Apex Controllers

Controller Responsibility
BookingEngineController Availability search, booking holds, booking confirmation.
PricingController Pricing calculations and discount processing.
PaymentController Payment processing and booking finalization.

🔄 End-to-End Data Flow

Customer Search
      │
      ▼
Resource Selection
      │
      ▼
Temporary Hold
      │
      ▼
Pricing Calculation
      │
      ▼
Payment Authorization
      │
      ▼
Booking Creation
      │
      ▼
Platform Event Published
      │
      ▼
Notification Flow Triggered
      │
      ▼
Confirmation Delivered

🔐 Security & Compliance

  • with sharing Apex Controllers
  • Named Credentials for external integrations
  • Secure payment tokenization
  • Custom Metadata driven configuration
  • Role-based access control
  • Platform Event audit trail
  • PCI-friendly payment architecture
  • GDPR-ready data management approach

🚀 Deployment

sf org login web --alias booking-org

sf project deploy start \
--source-dir force-app \
--target-org booking-org

sf apex run test

🎯 Business Use Cases

  • Hotel & Resort Reservations
  • Healthcare Appointment Scheduling
  • Training & Event Registrations
  • Equipment Rental Systems
  • Conference Room Booking
  • Consultation Scheduling
  • Sports Facility Reservations
  • Professional Services Booking

📌 Conclusion

Salesforce Booking Portal demonstrates how a complete enterprise-grade booking solution can be built entirely on the Salesforce Platform. By combining Lightning Web Components, Apex, Flows, Platform Events, Stripe, PayPal, and configurable metadata, the application delivers a scalable booking experience covering discovery, reservation, payment, confirmation, and operational management.