function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AmrutAmrut 

Lightning QuickAction (API) without modal or Pop Up

I am attempting to replace JS buttons with quick actions. These button simply call a web service method and alert the result and need no user interaction.
With quick action a modal always seems to appear and this is not desirable.
I am calling the Webservice method in the doInit function and firing a toast event with the results and have no need for the modal popup.
Seems an oversight maybe? But is there a way to accomplish this without the modal to closely mimic the JS button functionality?
Ideally we could show the spinner without the modal
Right now I am simply calling
$A.get("e.force:closeQuickAction").fire();
at the end of the doInit but it is not the most ideal in way of a UI to do this IMHO as it flashes the modal on the screen briefly.
Narender Singh(Nads)Narender Singh(Nads)
Hi Amrut,
This is the standard functionality for lightning quick action. You can suppress the modal. The modal will show even if you put  $A.get("e.force:closeQuickAction").fire()  in your code.
There is no workaround for this. I have been in your situation. 
What I had did was I had put a spinner in the modal this I got the response. You can do that do.

Thanks
balaji manikandanbalaji manikandan
this just worked perfectly to hide my model box and there wont be any backdrop also.

<aura:component>

 <aura:html tag="style">
        .slds-modal {
        visibility: hidden;
        display: none;
        }
        .slds-backdrop{
        display: none;
        
        }        
    </aura:html>

<aura:handler name="init" value="{! this }" action="{!c.doInit }"/>
</aura:component>


--------------- Aura Controller JS---------------------
  doInit: function (component, event, helper) {
       $A.get("e.force:closeQuickAction").fire();
         
        var evt = $A.get("e.force:navigateToComponent");
        evt.setParams({
            componentDef : "c:methodName",
            componentAttributes: {
            recordId : component.get("v.recordId")
        }
           
        });
        evt.fire();
},