Skip to main content

#Quick Actions0 discussing

Good morning!

I was trying to create an action to put on the list view of Accounts, in order to create a new account with a layout showing a few fields. I came to realize that when creating an action which creates a new record, by default it behaves as 'create new child record' so you can only use it when selecting an account on the list view and then clicking the button (otherwise you get an error message). Salesforce support confirmed this is works as designed.

Now my question is: how do I create an action/button that does what I'm looking for? I created a global action to do this from the record page but I want to put one on the list view as well.

#Quick Actions #List Views

5 answers
  1. Jul 24, 2025, 8:35 AM

    Any OOTB solutions to it? All I can think about is overriding the custom quick action. But nothing from the Standard functionality side.

0/9000

I'm currently facing an issue with displaying a Lightning Web Component (LWC) quick action button on the Task record page.

Here are the details of what I've done:

 

1. LWC Quick Action Creation:

  • I have created a Lightning Web Component for a quick action under the Task object.
  • I updated the XML as shown below:

<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">

    <apiVersion>57.0</apiVersion>

    <isExposed>true</isExposed>

    <targets>

        <target>lightning__RecordAction</target>

    </targets>

    <targetConfigs>

        <targetConfig targets="lightning__RecordAction">

            <actionType>ScreenAction</actionType>

        </targetConfig>

    </targetConfigs>

</LightningComponentBundle>

 

2. Page Layout Configuration:

  1. I have added the button to the page layout under "Salesforce Mobile and Lightning Experience Actions."

Despite following these steps, the quick action button is not visible on the Task record page. I have ensured that the action is available in the "Lightning and Mobile Actions" section of the page layout.

Can anyone help me identify what might be causing this issue or suggest any additional steps to troubleshoot? Your assistance is highly appreciated.

Thank you in advance!

 

#Developers #Lightning Web Components #Quick Actions #Pagelayouts

4 answers
  1. Nov 28, 2024, 6:00 PM

    I had a similar problem, and found a solution for my case:

    In Service Setup > Channels > Digital Experiences > Settings, make sure the "Use Lightning web components on your record pages in Aura sites" option under "Experience Management Settings" is checked.

0/9000

I am trying to create an action that shows up in the Field Service mobile app that when the user clicks on the action, it takes them to a specific url. I can not get the action to show up on mobile app for service resources to use. I’ve built the action, added it to the page layout and still nothing. Any thoughts?

#Salesforce Field Service #Quick Actions #Custom Action Button
1 comment
0/9000

With Summer 21', we have the ability to create a Quick Action from a LWC. https://developer.salesforce.com/blogs/2021/05/learn-moar-with-summer-21-lwc-quick-actions.html

https://help.salesforce.com/articleView?id=release-notes.rn_lwc_quick_actions.htm&type=5&release=232

The Quick Action doesn't use any of the HTML I can write in this component :

But I want to include a Spinner. I search for many ideas, creating another component which include just a spinner, but it seems really hard to open and close this component from the first one. I also didn't find any way to call a spinner by the JS without the HTML

There is my code :

 

getAccountReport.js

import { LightningElement, api, track } from 'lwc';

import { ShowToastEvent } from 'lightning/platformShowToastEvent';

import getAccountReport from '@salesforce/apex/WS_Account_Report.getAccountReport';

export default class GetAccountInfosQALWC extends LightningElement

{

@api recordId;

@api invoke() {

//Here i'm sending a Toast message as a workaround

//But I want the spinner starting here

this.showToastMessage(1,'We are getting your report in few seconds...');

getAccountReport({accId : this.recordId })

.then((result) => {

//I want the spinner to stop here

if(result != true && result != 'true'){

this.showToastMessage(1,result);

}

else{

this.showToastMessage(2,'The report was successfully downloaded');

eval("$A.get('e.force:refreshView').fire();");

}

})

.catch((error) => {

console.log(error);

});

}

showToastMessage(fromWho, mess, urlToast) {

var variantToast;

var titleToast;

if(fromWho == 1){

variantToast = 'info';

}

else if(fromWho == 2){

variantToast = 'success';

titleToast = 'Success'

}

const toastMessage = new ShowToastEvent({

title: titleToast,

message: mess,

variant: variantToast,

messageData: [

{

url: urlToast,

label: 'here'

}

]

});

this.dispatchEvent(toastMessage);

}

}

getAccountReport.js-meta.xml

<?xml version="1.0" encoding="UTF-8"?>

<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">

<apiVersion>52.0</apiVersion>

<isExposed>true</isExposed>

<targets>

<target>lightning__RecordAction</target>

</targets>

<targetConfigs>

<targetConfig targets="lightning__RecordAction">

<actionType>Action</actionType>

</targetConfig>

</targetConfigs>

</LightningComponentBundle>

I already tested to put the spinner in the HTML, that's not working.

 

#LWC  #Lightning Web Components  #Quick Actions  #Service Cloud  #New Releases

Thanks you !

4 answers
  1. Jun 13, 2024, 1:58 PM

    if you dont wanna utilize html,

    You can try add spinner html in slds to dom by js and remove it.

     

    this is demo code

     

    import { LightningElement } from 'lwc';

    export default class SpinnerComponent extends LightningElement {

    addSpinner() {

    const container = this.template.querySelector('.spinner-container');

    const spinnerHTML = `

    <div class="demo-only demo-only_viewport" style="height:6rem;position:relative">

    <div role="status" class="slds-spinner slds-spinner_medium">

    <span class="slds-assistive-text">Loading</span>

    <div class="slds-spinner__dot-a"></div>

    <div class="slds-spinner__dot-b"></div>

    </div>

    </div>`;

    container.innerHTML = spinnerHTML;

    }

    removeSpinner() {

    const container = this.template.querySelector('.spinner-container');

    container.innerHTML = '';

    }

    }

0/9000

Don't judge but we are still using classic. I have a handful of Custom Buttons on Accounts and Leads. It's my understanding that it's best practices to convert these to Quick Actions for lightning. I've done this and they seem to work. 

 

Here's my question.... When I am in classic I only see the buttons, when in Lightning I see both. Is there a way I can edit the page layout etc so that I only see the Actions when I am lightning?

 

It would be MUCH simpler to just leave the custom buttons. What are the downsides to this?

 

#Lightning Experience  #Quick Actions  #Custom URL Button

2 answers
  1. Feb 26, 2024, 7:20 PM

    To remove one of the buttons while in Lightning Experience, you can remove the button from the Salesforce Mobile and Lightning Experience Actions section. This enables the custom button that works both in Classic and LE to be shown just once. 

    As an alternative way, you can conditionaly render specific buttons by editing the Lightning Record Page: https://help.salesforce.com/s/articleView?id=sf.lightning_page_components_visibility.htm&type=5

    Keep in mind that only custom buttons that execute javascript code are not supported in Lightning Experience

0/9000

Hello everyone,

I know on the first look this seems like an issue which should be doable via the dynamic forms on Lightning Record pages. However, sadly this is not the case for my Problem.

The Problem itself occurs in the Financial Services Cloud. This cloud has a specific component to show insurance policies on the Account (It works like a normal related list but with additional features) This feature takes the actions it provides to users from the Lightning Actions which are defined in the respective page layout.

Now to the actual Problem: We would like to have a specific action available in this component but not on the normal mobile page for insurance policies. So far I have sadly not found a way to separate this.

 

This is the Action we want to have: (Please don't mind the partially German interface)Separate Page Layouts for Mobile and Desktop due to Lightning Actions (SF-FSC)

This is the Action I don't want to see:

20240215_Bug_Action2.pngThanks for any help :)

 

#Mobile  #Pagelayouts  #Quick Actions  #Financial Services Cloud

2 answers
  1. Feb 15, 2024, 8:32 AM

    @Manoj Nambirajan Sadly I don't think that this will use my actual issue. Even if I include a filter based on device, I need to use the Lightning Actions in the the Page Layout. Reason for this is that I can only define the actions in the component on the Account via the Lightning Actions on the Insurance Policy Page Layout. (It sounds crazy, but sadly this seems to be the way it works)

    And as far as I see it those Lightning Actions don't care for dynamic forms and just show up on the mobile layout anyway. 

0/9000

Hi,

 

I managed to add the action as URL but I opened in a new page, Also I`ve created an aura component but I cant add it to the list view, I want that the screen flow will be opened as a popup and not new page.

 

Any suggestions?

 

Thanks!

 

#Lightning Aura Component #Quick Actions #PopUps

6 answers
0/9000
I've developed a quick action named "Clone" on the Account object. However, I'm encountering an issue – I'm unable to drag it to mobile and lightning; it seems to be functional only in the classic. Additionally, I'm seeking guidance on excluding two specific fields from this action.
6 answers
  1. Nov 20, 2023, 1:11 PM
    We can adjust the layout to showcase up to 8 fields, and any exceeding fields will automatically be displayed in the layout. Unfortunately, there isn't an option to hide specific fields.
0/9000

Hello,

 

We have just added another record type and page layout to our opportunity objects.  Our main opportunity record type is customized but our consultants were easily able to add another record type and layout for a different set of opportunities we are tracking.

 

The issue I am running into is that I am unable to remove two buttons from this new layout and I am also unable to see a button that I created via Docusign.  Please see attached screenshot.

 

I have added the 'Generate Agreement' quick action and button just to see if either would pop up.  Neither have.  

 

How can I see the Generate Agreement button or quick action link on the self serve layout record type?  What am I doing wrong?

 

#Salesforce #Quick Actions #Custom Button #Sales Cloud #Record Type

4 answers
0/9000

I have Included Flow in a lightning component and added it as a Quick action button. But I want the button color to be Red/Green so I think it is not possible by standard quick action creation. 

 

Want to know how to Include my flow to have an LWC custom button (Similar to quick action: which pops up on screen in Module). I have button code, I have flow LWC Quick action code but do not have an idea how to Include Custom quick action button with the flow in LWC.

 

Any help would be awesome. 

 

Thanks in advance. 

#Salesforce Development #LWC Component #Quick Actions

2 answers
  1. Oct 11, 2021, 6:58 AM

    Hi Shyam,

     

    Quick action buttons cannot be re-styled natively, and so any custom button that you may want to add would have to be placed elsewhere, away from where all the other buttons are. If you want your button to appear with the rest of the action buttons, it will be styled the same as the rest.

     

    You might be able to find a method of injecting CSS into the record page, and perhaps identifying the button by its unique ID, but these methods are liable to break - especially considering Salesforce will be replacing lightning locker with something new soon. Today, you could probably achieve this by having a lightning component on the page that uses the loadStyle function to load a custom stylesheet from a static resource. That stylesheet would be able to influence elements on the page outside of the lightning component. Again, I cannot be certain that this will continue to work in the future. And of course, this isn't something Salesforce would approve of.

     

    If you wanted to create a custom button and place it elsewhere, then you can always create a lightning component that displays that button, and drag it to any location in the lightning page builder.

0/9000