Screen Flow LWC Local Actions in Winter '26 : [email protected] (Bob Buzzard)
Screen Flow LWC Local Actions in Winter '26
by: [email protected] (Bob Buzzard)
blow post content copied from Bob Buzzard Blog
click here to view original post
### Summary of the Content In the Winter '26 update of Salesforce, Lightning Web Components (LWCs) can now be used as local actions within screen flows. This means that JavaScript can run directly on the client side, eliminating the need for server interactions for certain actions. **Key Features:** - **Local Actions:** LWCs can perform actions like displaying modals and toasts without server calls. - **Implementation:** To create a local action, the LWC must define an `invoke` function. For example, a modal can show a warning to users about their actions. - **Property Passing:** Properties like title, content, and size can be passed into the LWC using the `@api` decorator. **Sample Implementation:** 1. A modal is created that prompts users and a toast to show results. 2. Properties are defined in the `js-meta.xml` file, enabling easy configuration for reuse in various scenarios. **Flow Configuration:** An example flow deletes a contact (for demo purposes, it only simulates deletion). The flow uses properties for the warning modal and a formula resource for success messages. **Challenges:** Originally, the plan included a confirmation dialog for deletions, but the author encountered limitations in passing information back to the flow from the LWC. This issue could potentially limit the feature's functionality until resolved. ### Additional Information - This feature is part of the ongoing evolution of Salesforce to enhance user experiences and tool capabilities. - For further details, you can refer to related resources like the Winter '26 release notes or the associated GitHub repository for practical examples. ### Relevant Hashtags for SEO #Salesforce #LightningWebComponents #LocalActions #Winter26 #JavaScript #FlowConfiguration #SalesforceUpdates #TechBlog #WebDevelopment #NoServerCalls
November 05, 2025 at 09:55PM
Click here for more details...
=============================
The original post is available in Bob Buzzard Blog by [email protected] (Bob Buzzard)
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================
by: [email protected] (Bob Buzzard)
blow post content copied from Bob Buzzard Blog
click here to view original post
### Summary of the Content In the Winter '26 update of Salesforce, Lightning Web Components (LWCs) can now be used as local actions within screen flows. This means that JavaScript can run directly on the client side, eliminating the need for server interactions for certain actions. **Key Features:** - **Local Actions:** LWCs can perform actions like displaying modals and toasts without server calls. - **Implementation:** To create a local action, the LWC must define an `invoke` function. For example, a modal can show a warning to users about their actions. - **Property Passing:** Properties like title, content, and size can be passed into the LWC using the `@api` decorator. **Sample Implementation:** 1. A modal is created that prompts users and a toast to show results. 2. Properties are defined in the `js-meta.xml` file, enabling easy configuration for reuse in various scenarios. **Flow Configuration:** An example flow deletes a contact (for demo purposes, it only simulates deletion). The flow uses properties for the warning modal and a formula resource for success messages. **Challenges:** Originally, the plan included a confirmation dialog for deletions, but the author encountered limitations in passing information back to the flow from the LWC. This issue could potentially limit the feature's functionality until resolved. ### Additional Information - This feature is part of the ongoing evolution of Salesforce to enhance user experiences and tool capabilities. - For further details, you can refer to related resources like the Winter '26 release notes or the associated GitHub repository for practical examples. ### Relevant Hashtags for SEO #Salesforce #LightningWebComponents #LocalActions #Winter26 #JavaScript #FlowConfiguration #SalesforceUpdates #TechBlog #WebDevelopment #NoServerCalls
Original image created by GPT 5o based on a prompt from Bob Buzzard
Introduction
The Winter '26 release of Salesforce introduced Lightning Web Components as local actions in screen flows. This allows client-side JavaScript to be executed as a 'function' in the flow, without the need for a round trip to the server for an Apex action.
Sample Actions
For this blog post I created a couple of LWCs to act as local actions :
- A modal that displays a warning/reminder to a user and make them think about what they were about to do
- A toast that displays the results of the user's request
In order to use an LWC as a local action, it must implement a function named invoke, which carries out the JavaScript processing. The flow runtime executes this function when it encounters a local action element tied to an LWC. The invoke method for my modal local action is shown below:
@api title;
@api size;
@api content;
@api async invoke() {
const result=await ModalDemo.open({
size: this.size,
title: this.title,
content: this.content
});
console.log(result);
}
This opens the modal and displays a message based on the title, size and content properties supplied by the flow, making it suitable for reuse across multiple scenarios. In order to allow a flow to pass properties to an LWC, you need to decorate the property with @api in the LWC and define it in the targetConfigs section of the js-meta.xml file:
<targets>
<target>lightning__FlowAction</target>
</targets>
<targetConfigs>
<targetConfig targets="lightning__FlowAction">
<property name="title" type="String" label="Modal title" role="inputOnly" />
<property name="content" type="String" label="Modal content" role="inputOnly" />
<property name="size" type="String"
label="Modal size" default="large" role="inputOnly" />
</targetConfig>
</targetConfigs>
Note that I've defined these with a role of inputOnly, as the component only uses these properties to display the modal.
The Flow
I have simple flow based on the scenario of deleting a contact:
The Warning Modal configuration supplies the property values for the modal for this scenario.
These properties are simple text values here, but any resource can be used, as this the case for the Success Toast action which uses the contactInformation formula resource:
which is constructed from the record detail of the contact to be deleted:
Executing the Flow
For demo purposes I've added the flow to a Lightning App Builder page - note that it doesn't delete anything, just claims to have done so!
A Gotcha
Fun fact - my original idea for this demo was to have a confirmation dialog asking if you were sure you wanted to delete the record. I had to pivot from this, as it appears that it is currently not possible to pass information back to the flow from the LWC.
This would typically be achieved by publishing a FlowAttributeChangeEvent to update a property indicating if the user has confirmed or not, but when I try this (even when that is all the invoke method does!) I get the following error from the LWC:
I'm not sure whether this is me (I don't think so, as I've confirmed I'm doing the right thing based on multiple blogs and articles), unsupported (I can't find anything in the docs), or a bug, but it does rather limit the usefulness of this feature so hopefully it's either my mistake or Salesforce sort it out soon!
Related Posts/More Information
November 05, 2025 at 09:55PM
Click here for more details...
=============================
The original post is available in Bob Buzzard Blog by [email protected] (Bob Buzzard)
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================







Post a Comment