cancel
Showing results for 
Search instead for 
Did you mean: 

Catching A/R Invoice confirmation MessageBox user selection

former_member306083
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member185682
Active Contributor

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

Answers (2)

Answers (2)

former_member306083
Participant
0 Kudos

thank you!

former_member306083
Participant
0 Kudos

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

All the best!

former_member185682
Active Contributor

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