You need to sign in to do that
Don't have an account?
Steve Berley
quick actions - preventing or closing dialog
I'm creating a custom quick action for the lightning ui that requires no user input - just click the button and it starts.
Is it possible to prevent the Quick Action dialog from showing?
While not as good a solution, I'd like to make it vanish immediately, but I can't make it happen.
Component:
JS Controller:
Any suggestions?
Thanks,
Steve
Is it possible to prevent the Quick Action dialog from showing?
While not as good a solution, I'd like to make it vanish immediately, but I can't make it happen.
Component:
<aura:component implements="force:lightningQuickActionWithoutHeader"> <aura:handler name="init" value="{!this}" action="{!c.dismissIt}" /> </aura:component>
JS Controller:
dismissIt : function(component, event, helper) { var wasDismissed = $A.get("e.force:closeQuickAction").fire(); }As you can see they're as simple as possible but it's just not working.
Any suggestions?
Thanks,
Steve
May I suggest you please check with below link from the stack exchange community which might help you to accelerate further.
- https://salesforce.stackexchange.com/questions/163636/how-to-close-a-global-quick-action-lightning-component-popup
Please let us know if this helps.Thanks,
Nagendra
I made some tests with the Winter 18 version but that doesn't work without opening a new popup.
I had already closed the Quick Action dialog in the past as soon as another popup was opened (navigation/using the data services) but the simple toast is not enough. I am trying to find my old test which works but that was not completely reliable nevertheless.
Failed tests: all the renderer events are done before the display of the popup itself.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_renderers.htm
The button "Close" works but that is just the default sample of Salesforce for the test of the function handleClose .
I
Best regards
Alain
Here is the only sample I can give you which seems to work but I have to use ... a call back and a controller (useless normally):
It is a solution with only this call back that we need (the remote call should be useless).
action.setCallback(this, function(response) {
// here the force:closeQuickAction works (?) : I tried that during my work but I am not sure it is 100% reliable.
}
Best regards
Alain