cancel
Showing results for 
Search instead for 
Did you mean: 

SBO - UI - STOPING FORM FROM CLOSING

Former Member
0 Kudos

Hi all,

I'm trying to prevent a form from closing after i pressed the 'OK' button and do some checkings at the it_ITEM_PRESSED item event type. How can i stop it? Is there a way, an error message doesn't work, like it would in R/3. Am i doing it on the wrong event, should i use teh form unload event with some properties, i've tried to do it there, but theres the form.close = False statement doesn't work like in regular VB. Does anyone as a clue? Thanks in advance.

Helder Gonçalves

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Helder,

if you can catch the event before_action, setting the BubbleEvent=false should prevent any following SBO actions. I have not tried this yet, though.

HTH Lutz Morrien

0 Kudos

Lutz is correct.  Put your code in the item click event for the OK button. If your validation logic indicates that the record should not be saved, set BubbleEvent to false. The form will remain open and the record will not yet be saved to the database. Setting BubbleEvent to False cancels the event that triggered your code (in this case, it cancels the OK button click).

Former Member
0 Kudos

Many thanks,

Helder Gonçalves