Skip to Content

How to set condition by using Yes or No button of message box in SAP B1?

Hi all,

How can I set condition by using Yes or No of message box of You cannot change this document after you have added it. Continue?

Actually I can do codes of to execute instructions before and after adding Document in SAP B1 like this

If pVal.FormType = 133 AndAlso pVal.ActionSuccess = False AndAlso pVal.EventType = BoEventTypes.et_ITEM_PRESSED AndAlso pVal.ItemUID = "1" AndAlso pVal.FormMode = 3 Then
'Instructions here
End If

But Now I want if I click Yes button of message box then execute instructions before adding document in DB, if I click No then no execution of instructions will be

Please anyone can help me

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 22, 2017 at 01:37 PM

    Hi,

    It can be done something as below:

    int ithReturnValue;
    ithReturnValue = SBO_Application.MessageBox("Do you want to continue ?", 1, "Continue", "Cancel", "");
    
    if (ithReturnValue == 1)
    {
        BubbleEvent = true;
    }
    else
    {
        BubbleEvent = false;
    }
    

    Kind regards,

    ANKIT CHAUHAN

    SAP SME Support

    Add comment
    10|10000 characters needed characters exceeded