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
Debabrata BeraDebabrata Bera 

$A.get("e.force:closeQuickAction").fire(); - is not working

Here is my simple code - 
if(a == component.get("v.recordId")) {
            $A.get("e.force:closeQuickAction").fire();
            window.open('*****');
I am getting redirected to my URL but the empty window is not getting closed automatically.
Raj VakatiRaj Vakati
Are you testing it in salesforce one.app or lightning experience ??   

it work only in lightning experience 

 
Debabrata BeraDebabrata Bera
I am testing in lightning experience.
I have added the button in lightning experience to test that.
Is this is action specific???
Debabrata BeraDebabrata Bera
Here is the complete code-

.cmp
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global">
    <aura:attribute name="recordId" type="Id"/>
    <aura:handler name="init" value="{!this}" action= "{!c.doInit}" />
</aura:component>

.js
({
    doInit : function(component, event, helper) {
        console.log('Record Id-'+component.get("v.recordId"));
        var a = $A.get("$Label.c.********");
        console.log('Custom level value- '+a);
        if(a == component.get("v.recordId")) {
            $A.get("e.force:closeQuickAction").fire();
            window.open('https://************','_blank');
            
        } else {
            console.log('else condition');
            $A.get("e.force:closeQuickAction").fire();
            window.open('https://***************','_blank');
        }
                
    }
})

Please let me know if i missed out anything.