Posted: 28 Jun 2017 19:45 EDT Last activity: 3 Jul 2017 2:07 EDT
When rule to check if in Modal Dialog
I have a flow action that can run in Modal Dialog in one case, and in the main portal page (not Modal dialog) in other case.
I have a 'Cancel' button on the section for this flow action. The Cancel button has action 'close' that disposes off the modal dialog when clicked. However this button is effective only when the flow action runs in modal dialog.
I want to hide the 'cancel' button when the flow action does not run in modal dialog. What is the When rule or a property value that I can use to determine if the current flow action is running in modal dialog window or not?
In OOTB(out of the box), the Cancel button in the modal dialog is from the pzModalTemplate section. The cancel button in the flow action refers from the pyCaseActionAreaButton. I understand that you are looking to hide the cancel button while the section is loaded as FlowAction and it should be shown when the section is loaded in the modal dialog. Is my understanding correct? If yes, are you using OOTB modal dialog template pyModalTemplate or have customized it?
Can you try with below visibility condition on the Cancel button
Hi Rincy, thanks for the suggestion. I am using the template 'ModalInteractionTransfer' with 'override default modal template' checked.
The visibility condition doesn't work :-(. The visibility condition is based on FlowAction, which runs here in both cases (in and not-in Modal dialog). There should be a property that would help determine if we are running in a Modal dialog window.
param.bIsModal works partially. When flow action is not running in modal dialog, I don't see the Cancel button (good).
When running in Modal dialog, I see the Cancel button. However, when I make changes on the UI (radio button) and the UI is refreshed ('Disable submit on Refresh' is not checked), the Cancel button disappears. How to fix this?
Ok so what happens is that param will be only available during whole refresh since this is internal param. And you are only doing partial refresh by yourself, you will not have these params.
In your pre processing activity, for the first time when modal is opened, you can take backup of this param onto a property (transient ?) and then use that property for conditions. That way you will be sure with your logic.