[SalesForce] How to hide default popup of Quick Action

I have created one Component from which I'm creating new record, using force:createRecord

The new record creation page is opening perfectly on click of Quick Action but one new blank model is also showing up on top of that page.
I'm not able to figure out how to hide this popup.

The screenenter image description here of Popup:

Here is my code:
Component:

<aura:component implements="force:lightningQuickAction" access="global" >
      <aura:handler name="init" value="{!this}" action="{!c.createRecord}"/>
</aura:component>

Controller:

   ({
       createRecord: function(component, event, helper) {
          var createRecordEvent = $A.get("e.force:createRecord");
          createRecordEvent.setParams({
             "entityApiName": "custom_obj__c",
              "defaultFieldValues": {
            'Name' : 'Abc'
            }
          });
          createRecordEvent.fire();
$A.get("e.force:closeQuickAction").fire();
       }
    })

Best Answer

Basically you need fire closeQuickAction event after createRecord event to close quick action window. Add below code after firing createRecord event.

    var dismissActionPanel = $A.get("e.force:closeQuickAction");
    dismissActionPanel.fire();
Related Topic