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
Jayant Kumar JaiswalJayant Kumar Jaiswal 

e.force:closeQuickAction not working in the callback method of showNotice

On click of OK in showNotice, I want the whole Lightning component configured in quick action to close. I'm using below code:
cmp.find('createQifNitify').showNotice({
                "variant": "error",
                "header": "Create QIF",
                "message": validationMessageString,
                closeCallback: function() {
                alert('You closed the alert!');
                $A.get("e.force:closeQuickAction").fire();
            }
            });
Is is possible this way?
shuja uddin 2shuja uddin 2
I just now face the same issue so if anyone stuck on same problem you can simply do like this:

({
    doInit : function(component, event, helper) {
        var closeQuickAction = $A.get("e.force:closeQuickAction");
        component.find('notification').showNotice({
            "variant": "error",
            "header": "Create QIF",
            "message": validationMessageString,
            "closeCallback": function(){
                 closeQuickAction.fire();
             } 
         });
    }
})