1

Am facing one issue when loading lightning quick action and calling lightning component.

By putting closeAction it actually closes the record creation modal box but not the blank box. Below is the code:

({
doInit: function(component, event, helper) {
    var createRecordEvent = $A.get("e.force:createRecord");
    createRecordEvent.setParams({
        "entityApiName": "custom__obj__c",
    });
    createRecordEvent.fire();
    $A.get("e.force:closeQuickAction").fire();
}
})
  • I am having the same issue. did you get this resolved? – disasterlooms Feb 27 '19 at 18:45
2

I ran into a similar issue when trying to fire the closeQuickAction event in an init handler. I ended up putting it in the renderer inside of a window.setTimeout

e.g.

afterRender: function (component, helper) {
    this.superAfterRender();
    window.setTimeout(
        $A.getCallback(function () {
            $A.get("e.force:closeQuickAction").fire();
        }), 500
    );
}
| improve this answer | |
  • I have a global action that is a custom component. This Requires the user to make a selection then calls a record new modal with the correct record type based on the selection. I have been unable to get the first modal to close and then create the second modal. I have not use afterRender. Do you think your method will work for my situation ? Can you put your controller, helper, and renderer code? – disasterlooms Feb 27 '19 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.