Skip to Content
0
Former Member
Jul 20, 2017 at 04:39 PM

System form validation

105 Views

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