cancel
Showing results for 
Search instead for 
Did you mean: 

SAPbouiCOM.Framework.Application.SBO_Application.MessageBox cancelling sap event

sg2707
Participant
0 Kudos
695

HI,

We are trying to prompt a message box and if user press cancel, we cancel the adding of SAP document. We have added the AddButton_ClickBefore handler. The prompt appears as expected, but setting bubbleevent to true doesnt make the SAP continue processing.

We have noticed that, if the message box is shown then SAP is not continuing its process any more. if no messagebox, it works.

            this.AddButton.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.AddButton_ClickBefore);



 private void AddButton_ClickBefore(object sboObject, SAPbouiCOM.SBOItemEventArg pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;
                if (2 == SAPbouiCOM.Framework.Application.SBO_Application.MessageBox("msg", DefaultBtn: 1, Btn1Caption: "ok", Btn2Caption: "cancel"))
                            {
                                BubbleEvent = false;
                                  
                                }                              
        }

Accepted Solutions (0)

Answers (0)