Under Sales Order Line, I tried to pass in a description different from Original Item description. I used SendKeys function to pass in the {^TAB} but the Item Search still pupop and throw error message "Bad Value".
I knew by setting the BubbleEvent to False will solve this problem. But i could not find it under B1DE listener. Below is my code for form 139.
Public Class Matrix__SO139__38
Inherits B1Item
Public Sub New()
MyBase.New()
FormType = "139"
ItemUID = "38"
End Sub
<B1Listener(BoEventTypes.et_ITEM_PRESSED, True)> _
Public Overridable Function OnBeforeItemPressed(ByVal pVal As ItemEvent) As Boolean
Dim form As Form = B1Connections.theAppl.Forms.Item(pVal.FormUID)
Dim item As Item = form.Items.Item("38")
Dim matrix As Matrix = CType(item.Specific, Matrix)
'ADD YOUR ACTION CODE HERE ...
Try
'Auto insert a row in Order
If pVal.ColUID = "U_TruckNo" Then
B1Connections.theAppl.MessageBox(pVal.Row)
matrix.AddRow(1)
B1Connections.theAppl.MessageBox(pVal.Row)
Dim oEdit As SAPbouiCOM.EditText
Dim oText As SAPbouiCOM.EditText
oText = matrix.Columns.Item("1").Cells.Item(pVal.Row).Specific
'oText.String = "A0000010"
oEdit = matrix.Columns.Item("1").Cells.Item(pVal.Row + 1).Specific
oEdit.String = oText.String '"A0000010"
oEdit = matrix.Columns.Item("3").Cells.Item(pVal.Row + 1).Specific
oEdit.Active = True
oEdit.String = "Over time"
DoEvents()
B1Connections.theAppl.SendKeys("^")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
Return True
End Function
End Class
Hi,
The bubble event variable has been packaged in B1DE as the return value from the method called per each event (OnBeforeChooseFromList method for example in the autogenerated code).
If you return "true" (default value in autogenerated code) then bubble event = true.
Return True
End Function
If you return "false" then bubble event = false.
Return False
End Function
Hope it helps
Trinidad.
Add a comment