The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)

Question

I’ve a problem when I run simple add-on into SAP Business One. I’ve gotten this exception through this snippet of this code :

                ' After changing the item quantity
                If (pVal.ItemUID = "mat") And (pVal.ColUID = "ActQuan") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE) Then
                    Dim oEditPrice As SAPbouiCOM.EditText   ' Item Price
                    Dim oEditTDTotal As SAPbouiCOM.EditText    ' To Date Total
                    Dim oEditTDQuan As SAPbouiCOM.EditText    ' To Date Quan
                    Dim oEditCuttings As SAPbouiCOM.EditText    ' Cuttings
                    Dim oEditTotal As SAPbouiCOM.EditText   ' Total = TDTotal - Cuttings
                    Dim oEditActQuan As SAPbouiCOM.EditText

                    ' Get the items from the matrix
                    oEditPrice = colItemPrice.Cells.Item(pVal.Row).Specific
                    oEditTDTotal = colItemTDTotal.Cells.Item(pVal.Row).Specific
                    oEditTDQuan = colItemTDQuan.Cells.Item(pVal.Row).Specific
                    oEditTotal = colItemACuttings.Cells.Item(pVal.Row).Specific
                    oEditCuttings = colItemCuttings.Cells.Item(pVal.Row).Specific
                    oEditActQuan = colItemActQuan.Cells.Item(pVal.Row).Specific

                    ' Copy the value of TDQty
                    Dim tmpInt As Integer
                    tmpInt = CInt(oEditActQuan.Value)
                    oEditTDQuan.Value = CInt(tmpInt)

                    ' Copy the value of TDTotal
                    Dim tmpIn As Integer
                    tmpIn = CInt(oEditTDQuan.Value) * CInt(oEditPrice.Value)
                    oEditTDTotal.Value = CInt(tmpIn)

                    'Calc Total Row - ACuts
                    Dim tmpTotal As Integer ' temp variable to contain total result
                    tmpTotal = CInt(oEditTDTotal.Value) - CInt(oEditCuttings.Value)
                    oEditTotal.Value = CInt(tmpTotal)

                    ' Calc the document total

                    Dim CalcTotal As Double
                    Dim i As Integer

                    CalcTotal = 0
                    ' Iterate all the matrix rows
                    For i = 1 To oMatrix.RowCount
                        oEditTotal = colItemACuttings.Cells.Item(i).Specific
                        CalcTotal += oEditTotal.Value
                    Next
                    oDocTotal.Value = CalcTotal
                End If
            End If
        End If

I use VB.Net. I have an issue with ColUID = “ActQuan” . Can anyone help me ? I changed this column many times and the same error.

0
2 weeks 0 Answers 8152 views 0