Skip to Content

Catching A/R Invoice confirmation MessageBox user selection

Hi, I`m trying to run an add-on when the A/R invoice is added, but I need to catch what the user select in the confirmation message MessageBox.

the following code is for read the data from the form, but I need to catch the selection to this MessageBox to execute the add on or not.

if (pVal.FormType == 133 && pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED && pVal.FormMode == 3 && pVal.ItemUID == "1" && pVal.Before_Action == true)

{

// read data form AR Invoice form

}

How can I do that?

Best regards

captura.jpg (16.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Feb 23, 2017 at 05:44 PM

    Hi Sebastian,

    Try to do your logic on the FormDataEvent when event type is equals et_FORM_DATA_ADD and BeforeAction equals false.

    Hope it helps.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 23, 2017 at 06:14 PM

    Thank you Diego, in case of a error, can I execute a rollback in this event?

    All the best!

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sebastian,

      This event happens before sap do his action on the database and you can set the BubbleEvent to false to avoid the SAP B1 action if you want.

      Kind Regards,

      Diego Lother

  • Feb 23, 2017 at 11:30 PM

    thank you!

    Add comment
    10|10000 characters needed characters exceeded