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.
Calling “Process Action” from an activity - Couldn’t find such OOTB activity
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.
@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.
This is a GenAI-powered tool. All generated answers require validation against the provided references.
@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.
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