Tag Archives: Quick Action

Salesforce Mass Quick Actions in Lightning Experience

In Spring’18 release, Salesforce introduced Mass Quick Actions in Lightning Experience on ListView. Using Mass quick action users can do mass action on the selected records (Up to 100 records) in a list view, except for recently viewed lists. We can use mass quick action with cases, leads, accounts, campaigns, contacts, opportunities, work orders, and custom objects in Lightning Experience.

Here is an example of Mass Quick Action. In below example I’ve craeted a Mass Quick Action on Account object to update mass records Account Type field from List View.

1. Create New Quick Action Button

Setup | Object Manager Tab | Navigate to Account object | Click Buttons, Links and Actions menu | Click New Action button

Create New Quick Action with following values:

2. Add Quick Action Button to Layout

Go to Account Object | Click Search Layouts menu | Select Edit under ListView

Got to “List View Actions in Lightning Experience” section, and add “Update Customer Type” Quick Action and save it.

3. Open Account Tab

Click the Account tab | Select a view except Recently Viewed | You can see “Update Customer Type” button.

4. Select Account Rcords to Update

Select multiple Account records, up to 100 records from the list view. Click “Update Customer Type” button, and select a Type from picklist values, and click Save button, and then OK button to confirm.

Now, all selected account records Type field will be updated with new value.

Lightning Component Quick Action With Custom Header And Footer

Lightning Component:

<aura:component implements="force:lightningQuickActionWithoutHeader,flexipage:availableForRecordHome,force:hasRecordId">
    
    <!--Custom Styles for Modal Header and Footer-->  
    <aura:html tag="style">
        .cuf-content {
        padding: 0 0rem !important;
        }
        .slds-p-around--medium {
        padding: 0rem !important;
        }       
        .slds-modal__content{
        overflow-y:hidden !important;
        height:unset !important;
        max-height:unset !important;
        }
    </aura:html>
    
    <!--Modal Header-->   
    <div class="modal-header slds-modal__header slds-size_1-of-1">
        <h4 class="title slds-text-heading--medium">Biswajeet Samal's Blog</h4>
    </div>
    <!--End Modal Header-->   
    
    <!--Modal Body-->    
    <div class="slds-modal__content slds-p-around--x-small slds-align_absolute-center slds-size_1-of-1 slds-is-relative">
        <form class="slds-form--stacked">
            Welcome to Biswajeet Samal's Blog
        </form> 
    </div>
    <!--End of Modal Body-->  
    
    <!--Modal Footer-->
    <div class="modal-footer slds-modal__footer slds-size_1-of-1">
        <lightning:button variant="Brand" class="slds-button" label="Submit" onclick="{!c.handleSubmit}"/>
        <lightning:button variant="Neutral" class="slds-button" label="Cancel" onclick="{!c.handleClose}"/>
    </div>
    <!--End of Modal Footer-->
</aura:component>

JS Controller:

({
    handleSubmit : function(component, event, helper) {
        
    },
    
    handleClose : function(component, event, helper) {
        $A.get("e.force:closeQuickAction").fire() 
    }
})

Output: