Skip to Content
0

System form validation

Jul 20, 2017 at 04:39 PM

64

avatar image
Former Member

I am new SAP B1 SDK but, many years programming.

I am trying to add some validation to Adding a Sales Order. I have got most of it figured out but exactly how to implement it.

What I have tried. I built a function to check the pertinate data but, I find if I try to override the save button's Before_Click function that I effectively bypass that entire function call.

I did get the desired effect by moving my function call to the Save button's PressedBefore event. However, is this the best/or only way of adding functionality to an event in SAP B1?

Ideally, I would like to take a button click event add to the process's before_click event and then let SAP B1 continue with it's button_click event.

Pretty simple function call:

Private Sub Button0_ClickBefore(sboObject As Object, pVal As SAPbouiCOM.SBOItemEventArg, ByRef BubbleEvent As Boolean) Handles Button0.ClickBefore
'Throw New System.NotImplementedException()
CheckDataSource() 'My function call
End Sub

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

ANKIT CHAUHAN
Jul 21, 2017 at 05:18 AM
0

Hi Joey,

Refer to FormDataEvent under SDK Help Center and SDK Samples for the same. Here you can get bit information about it.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Share
10 |10000 characters needed characters left characters exceeded
Danilo Kasparian Jul 21, 2017 at 02:40 PM
0

Depends on what you are validating I would use the SP_TransactionNotification, you won`t need any add-on running to validade it.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jul 21, 2017 at 09:45 AM
0

Hi Joey,

It's not recommended to use Click or Pressed (these can be bypassed especially if your using UDO's)

Using the Before FormDataAddEvent will get you the behavior you are looking for.

Pedro Magueija

LinkedIn | Twitter | Blog

Share
10 |10000 characters needed characters left characters exceeded