Skip to Content
0

Catching A/R Invoice confirmation MessageBox user selection

Feb 22, 2017 at 11:01 PM

86

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
DIEGO LOTHER Feb 23, 2017 at 05:44 PM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Sebastian Pereira Cendan Feb 23, 2017 at 06:14 PM
0

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

All the best!

Show 1 Share
10 |10000 characters needed characters left 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

1
Sebastian Pereira Cendan Feb 23, 2017 at 11:30 PM
0

thank you!

Share
10 |10000 characters needed characters left characters exceeded