cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent action (lead selection change) with popup (confirmation)?

christian_frier2
Explorer
0 Kudos

Hello all,

I have an application where I want the user to confirm when he selects a new line in a table. When the user selects a new line in the table an other used component reloads its data based on the new line selected. If the user has not pressed the save button before selecting a new line, any changes in the used component will be lost.

Currently I use onLeadSelect action on the table to call the load_data method(id=xxx) on the used component in order to display data relevant for id=xxx based the new line.

I can open a popup to confirm from the onLeadSelect-action or the WDDoBeforeAction, but the action still happens; it doesn't wait for the user to respond. And then any changes are lost...

I may have to store the parameters sent to the onLeadSelect method in context and continue when the button action from the pop-up returns via subscribed method, but I think this is an unelegant way of doing this.

There must be a better way...? Any ideas?

Regards,

Christian Frier

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

on the lead select event handler you can show the popup and no other logic. Move your logic to the ok and cancel button handlers of the pop up.

Answers (0)