Skip to main content

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