A headless Quick Action in Salesforce is a custom action executed within a Lightning Web Component (LWC). It doesn’t open the default modal window for user interaction and allows you to use custom logic and dynamic content.

In this blog, we will walk you through the key steps of creating a headless Quick Actions in LWC.

What Are Headless Quick Actions in Lightning Web Components?

A headless quick action executes custom code in a Lightning web component. Unlike a screen action, a headless action doesn’t open a modal window.

Prerequisite to Create a Headless Quick Action in LWC

Before creating a headless Quick Action in LWS, make sure you have all the necessary things mentioned below:

  1. Salesforce Developer Tools: Set up Salesforce DX and Visual Studio Code for development.
  2. Basic LWC Knowledge: Familiarity with creating and deploying Lightning Web Components.
  3. Access to Salesforce Org: You need access to a Salesforce org to create Quick Actions and deploy LWC components.
  4. Object for the Quick Action: Determine the object (e.g., Account, Opportunity) where you will place the Quick Action.

Steps to Create a Headerless Quick Action.

Step 1: Create the LWC Component

1. Create LWC component:

sfdx force:lightning:component: create –type lwc –component name HeaderlessQuickAction –output-dir force-app/main/default/loc

2. Define the HTML structure (headerlessQuickAction.html):

3. Handle the logic in the JavaScript controller (headerlessQuickAction.js):

Step 2: Create a Custom Quick Action

1. Navigate to Object Manager and select the object (e.g., Account, Opportunity) for which you want to create the Quick Action.

2. Go to Buttons, Links, and Actions, and click New Action.

3. Select the following settings:

  • Action Type: Lightning Component
  • Lightning Component: Choose your LWC (e.g., c:HeaderlessQuickAction)

4 Save the action and then add it to the page layout if needed.

Step 3: Override the Standard Header by defining the below XML

In the LWC Quick Action, to hide the standard Salesforce modal header, you’ll need to configure the metadata file by defining <targets> in headerlessQuickAction.js-meta.xml.

Step 4: Deploy the LWC component

sfdx force:source: deploy -p force-app/main/default/lwc/headerlessQuickAction

Conclusion

A headerless Quick Action in LWC simplifies the UI by removing the default modal header, providing a clean and customized user experience in Salesforce.

NIKO
Related Articles
Step-by-Step Guide to Enhance Your LWC Development Workflow with the Logger API

Are you looking to streamline your LWC development workflow but confused about how to do it? Then you are in the right place. The Salesforce Logger API is a powerful tool that helps you monitor, debug, and improve code quality in real time.  This step-by-step guide walks you through how to set it up and […]

Read More
Enhancing Your Salesforce Experience with a Custom Activity Component

In today’s fast-paced business landscape, productivity hinges on streamlined workflows and intuitive interfaces. While Salesforce offers robust activity tracking capabilities, sometimes the standard components fall short of specific organizational needs.  That’s where a Custom Activity Component comes in—designed to tailor your activity management experience, boost user efficiency, and provide deeper insights into customer interactions. In […]

Read More
Step-by-Step Guide to Integrating Salesforce Doc-Gen with eSigning Tools

In today’s fast-paced digital landscape, streamlining document workflows is no longer a luxury—it’s a necessity.  Integrating a document generation app, like Docs Made Easy, with an eSigning tool, helps businesses automate the entire document lifecycle—from creation to signature—saving time, reducing errors, and boosting productivity. In this guide, we’ll walk you through the key steps, tools, […]

Read More
How to Build a Real Time Chat Application Using LWC and Models API

The Models API plays a significant role in providing access to and facilitating interaction with large language models (LLMs) from various Salesforce partners such as Anthropic, Google, and OpenAI. It enables applications to leverage these models for various tasks, including text generation and other AI-powered capabilities. As a user, you can configure any Salesforce-enabled model […]

Read More
How to Integrate Salesforce Data Cloud with Amazon Redshift

Companies can finally connect Amazon Redshift to Salesforce Data Cloud without using the ordinary username & password authentication systems ever since its collaboration with AWS has happened. Business owners no longer have to be concerned about managing static credentials or breaching data security. By leveraging Salesforce IDP, companies can easily access their data lakehouse in […]

Read More
Trigger Prompt Templates Using Flow, Apex, or REST API

A prompt template is a pre-designed structure in Salesforce, specially designed to create personalized prompts by filling the substitute with particular details of customers, products, and more. This approach strengthens the creation of prompts and lets teams generate data-driven content. Every time a prompt template is used, it automatically merges the data to create a […]

Read More
Our Location worldwide
Indian Flag India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203117884
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada Canada
HIC Global Solutions INC
43 Lafferty Lane, Richmond Hill, L4C 3N8, CA +1(262) 310-7818