How to load (Auto launch) a modal dialog upon load of screen

Hi,

I have a requirement where I need to auto-launch a pop-up window (modal dialog) upon load of screen.

While going through similar posts I found below 2 approaches but I couldn’t find clear enough instructions to implement the solution. Below were the noteworthy approaches I found in previous posts.

  1. Calling “Process Action” from an activity - Couldn’t find such OOTB activity

  2. Placing a hidden button in the respective section and triggering click event in pre-actions (activity /DT) to launch the modal window- I couldn’t find clear instructions to do it either.

Appreciate the communities’ help on implementing the above mentioned requirement using the above mentioned approaches or using any other alternative approaches.

Thanks in Advance!

Tehan

@TehanM To auto launch a pop up window (modal dialog) upon the load of a screen you can use the approach of placing a hidden button in the respective section and triggering a click event. Here is a step by step guide to implement this solution: 1. Create a Hidden Button: Add a button to your section and give it a CSS class for example ‘hidden’. Ensure this button is configured to launch the local action that displays the modal dialog. 2. Add JavaScript to Trigger the Button Click: Use the following JavaScript code to automatically trigger the button click event when the section loads. This code should be added to the User Interface (UI) section where the modal dialog needs to be triggered. html $(document).ready(function () pega.util.Dom.getElementsByClassName(‘hidden’ ‘button’)[0].click() ) 3. Configure the Local Action: Ensure that the local action is properly configured to display the modal dialog with the required content. This approach leverages the hidden button to trigger the modal dialog automatically upon the section load providing a seamless user experience.

:warning: This is a GenAI-powered tool. All generated answers require validation against the provided references.

How to pop up a modal dialog at loading of a flow action?

@MarijeSchillern , we have a similar requirement, can you please provide screen shots of this solution implementation. I followed the steps, but the button click is not happening.

@AnithaK16861888

This was a GenAI-powered tool. All generated answers require validation against the provided references.

How to pop up a modal dialog at loading of a flow action?

@MaxonL16591286 as you resolved the quoted content, would you be able to help this user?

@MarijeSchillern

  1. add a button in the section to be loaded with “Other control format” include word “hidden” also “hidden” in class

and define action on this button to run a local action to popup dialog when clicked.

  1. add an embedded section in same section.

in the embedded section, none field need defined, just in the html tab, write JS code like in below link

desc:

when the section is loaded, the embedded section is also loaded, then the JS code defined in it will run, it find the button and send click event to the button

@MaxonL16591286 This worked Thank you.