I'm trying to set focus to another cell (user field) in the matrix of a 'Goods Receipt'
after ItemCode validation but the program enters an infinite loop.
This is my code:
Case SAPbouiCOM.BoEventTypes.et_VALIDATE
Select Case pVal.ColUID
Case "1"
If Not pVal.BeforeAction Then
If Not pVal.InnerEvent Then
oForm = m_oApp.Forms.Item(FormUID)
'oForm.Freeze(True)
oMatrix = oForm.Items.Item("13").Specific
oEdit = oMatrix.Columns.Item("1").Cells.Item(pVal.Row).Specific
Dim sItemCode As String = oEdit.String.Trim
oEdit = Nothing
If sItemCode <> "" Then
If IsItemD(sItemCode) Then
Try
oMatrix.Columns.Item("U_DescSemeRA").Cells.Item(pVal.Row).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
Catch ex As Exception
m_oApp.StatusBar.SetText("Rendere visibile e attiva la colonna 'U_DescSemeRA'", SAPbouiCOM.BoMessageTime.bmt_Long, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
End Try
End If
End If
oMatrix = Nothing
'oForm.Freeze(False)
oForm = Nothing
End If
End If
End Select