Skip to Content

​B1 SDK: Preventing code executing twice on event

Nov 09, 2017 at 06:37 PM


avatar image


I’m currently writing code to mod the procurement wizard. When the user arrives on panel 4, automation will happen to a matrix gird. When the automation done, a message box will appear. Below I have same code of the event I’m watching and a message box I’m displaying. Do you know which if statement I need to mod to ensure the code only executes once?

Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
	If pVal.FormType = "540010007" And pVal.ItemUID = "_wiz_next_" And pVal.EventType = 1 And pVal.BeforeAction = False Then
		If (oSOForm.PaneLevel = 4) Then
			'some code
			'then display message box
			SBO_Application.MessageBox("My Message", 1, "Ok", "Cancel", "")
		End If
	End If

End Sub



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

0 Answers