Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More
Create a Lightning Web Component Action

Create a Lightning Web Component Action

Configure a Custom Action that opens a Lightning Web Component in the Life Sciences Cloud mobile app for access to custom functionality from a record page.

Required Editions

Available in: Lightning Experience
Available in: Enterprise and Unlimited Editions with Life Sciences Cloud, Life Sciences Cloud for Customer Engagement Add-on license, and the Life Sciences Customer Engagement managed package.
User Permissions Needed
To create Lightning Web Component (LWC) actions: Life Sciences Commercial Admin
  1. Create a helloWorld Lightning Web Component by using Salesforce DX.
    1. Open the Command Palette: Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows).
    2. Type SFDX and select SFDX: Create Project.
    3. Press Enter to accept the standard option.
    4. Enter HelloWorldLightningWebComponent as the project name and press Enter.
    5. Select a folder to store the project and click Create Project.
    6. Open the Command Palette again, type SFDX, and select SFDX: Create Lightning Web Component.
    7. Enter helloWorld as the component name and accept the default path.
    8. Right-click the default folder under force-app/main and select SFDX: Deploy This Source to Org.

Create a quick action on an object by using the helloWorld component.

  1. From Setup, open Object Manager, select your object, click Buttons, Links, and Actions, and click New Action.
  2. Set the Action Type to Lightning Web Component, select helloWorld as the component, enter a label and name, and save.
  3. After creating the Custom Action in the Admin Console, enter the quick action name of the Lightning Web Component in the Quick Action field.

Tapping the action on the record page takes you to the corresponding Lightning Web Component.

Note
Note An LWC in the Salesforce mobile app doesn't go to the record detail after record creation. Because the server creates records directly, the app requires a round-trip sync before the record appears.
 
Loading
Salesforce Help | Article