Headerless Detail-Cancel Button

Sai Deshpande

Active Member
Hi List,

I have a requirement when a user clicks on the "Cancel" button of the headerless detail form a message form should appear displaying "Are you sure you want to Cancel?" with Yes/No buttons. On pressing "No" the entire application should close. Can anyone please help me with this?

First, I added a Form Exit button "Close" on headerless detail. I called the message form on this button clicked event.
I have passed flag=1 from the "No" button of the Message form to the headerless Detail form. And then, in the disloag is Initialized of Headerless detail I wrote the below ER
If FI.flag = 1
Press button(HC Cancel)
Endif
This does not seem to work.

Thanks in advance for your help.

Regards,
Sai Deshpande
E810/8.98
 
dialog is init is not the right event. put it in the button clicked event of your custom 'close' button, right after the form interconnect to the "are you sure..?" form.

ps: do you really want to close the app when user selects "no"?
wink.gif
 
I wrote the ER just below the line which calls the message form and closed the form based on the flag value returned from the message form.

Thanks,

Sai Deshpande
E810/8.98
 
Back
Top