cancel
Showing results for 
Search instead for 
Did you mean: 

How to update correctly a UDT at FORM_DATA_ADD

Former Member
0 Kudos

Hi,

When adding an item marketing document, my add-on has to update a UDT with all the lines in the document.

I have placed the update of this UDT in the BeforeAction == false and ActionSuccess is true on et_FORM_ADD_DATE.

But what if an error message appears when updating this UDT, how can I prevent that the document is not added in SBO either. If the update of the UDT fails for any reason I don't want to let the user to update the UDT.

What is the best practice in this case?

Thank you,

Irina

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Irina,

FormDataEvent happens when the data is added so there is no way you can roll it back should the error occurs.

have you tried SP_Transaction_Notification procedure for this? may be it helps.

regards,

Binita

Former Member
0 Kudos

Hi,

But can I test somehow on the BeforeAction == true that the update of the UDT will not trigger the error and on the BeforeAction == false to actually update the table?

Is this a good practice?

Irina

Former Member
0 Kudos

Irina,

even if you happen to know at the before action true event that the update process generates an errror, you will not be able to roll back ( or make bubble event false) the actual document creation . it is going to happen anyway .

or you are getting at something else?

Binita

Answers (0)