cancel
Showing results for 
Search instead for 
Did you mean: 

Modal screen after a modal screen

fjcarrasco
Active Participant
0 Kudos

Hi experts, I have the following scenario.

From a modal screen I execute a navigation action to go to another screen and despite the fact I'm telling is a modal screen, the second screen is open like a no-modal, I mean, it shows the Back button.

Second screen is a form so I need to do some validations and avoid the user leaves the screen in case of some error.

I do the validations in Onloaded event of the page however I can't see how to cancel the Back navigation when there is some error.

How can I force the second screen like a modal or cancel back navigation when there is some error ? Any suggestion?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

When a modal page is open and you navigate to another page it will be a navigation within the modal stack. This allows you to create multiple related pages in the modal. If you want to the next page to be a new modal stack, you will need to close the current modal first and then navigate to the new modal page.

fjcarrasco
Active Participant
0 Kudos

Ok @Bill many thanks

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

fjcarrasco One other option is to change the navigation action from Modal page 1 to Modal page 2 to set the Clear History property to True. This will still navigate to the new page in the modal but clear the previous modal page from the modal navigation stack. It would avoid the animation of closing the first modal and opening a second. End result is the same just a visual difference so try it out and use what works best for your requirements.

If desired you could also set the Transition animation to none as another visual option.

fjcarrasco
Active Participant
0 Kudos

Hello bill.froelich Thanks for your suggestion. I couldn't close de first modal page because I needed to back at the same location when I go back.

What I did was do the validations in onChange events of the fields on the second modal page and I ignore the fields with error when user go back.

Answers (0)