cancel
Showing results for 
Search instead for 
Did you mean: 

​B1 SDK: Preventing code executing twice on event

former_member272979
Participant
0 Kudos

Hi,

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

Regards,

William

Accepted Solutions (0)

Answers (0)