• About
  • Contact me!

Salesforce Everywhere

~ Blog on Salesforce Dev and admin stuff

Salesforce Everywhere

Tag Archives: Quick Action

How to Close Quick action in LWC

07 Saturday Aug 2021

Posted by Mani in Uncategorized

≈ Leave a comment

Tags

LWC Quick Action, Quick Action

Recently, as part of Summer 21 release, Salesforce has given us an option to call the LWC directly from the Quick Action, earlier we had to call Lightning Component(LC) from the Quick Action and call the LWC from LC.

In my current project, I had created a Quick Action called “Edit” and to close the Quick Action when user clicks on Cancel button inside the modal, we had to do the following:

import { CloseActionScreenEvent } from ‘lightning/actions’;

Let’s say the method closeModal is called, when user clicks on Cancel button:

closeModal() {

this.dispatchEvent(new CloseActionScreenEvent());

}

To create the modal when user clicks on Edit button, we have not used lightning-quick-action-panel component(Beta) and used Modals blueprint in SLDS. Please refer the above link for creating a Quick Action and calling the LWC from it:

https://developer.salesforce.com/blogs/2021/05/learn-moar-with-summer-21-lwc-quick-actions

Documentation for the lightning-quick-action-panel is available in the below link:

https://developer.salesforce.com/docs/component-library/bundle/lightning-quick-action-panel/documentation

Thanks and see you all at the next post!!

P.S: Tried Anchor PodCast tool for this blog post:) and here is the link https://anchor.fm/manibalan-sampathkumar/episodes/How-to-Close-Quick-action-in-LWC-e15j8ta

Blog Stats

  • 146,489 hits

Archives

Recent Posts: Salesforce Everywhere

Expert Salesforce Solutions from a Turnaround Master :)

Einstein GPT

How to get field values on onLoad in lightning-record-edit-form in LWC?

Using Dynamic Actions

How to check if the logged in user is a Guest user or not in APEX class?

Connect with me

  • View @manibalan_s’s profile on Twitter
  • LinkedIn

Follow this Blog via Email

Enter your email address and click on Follow us (below) to follow this blog and receive notifications of new posts by email.

Powered by WordPress.com.

Loading Comments...