Skip to Content
avatar image
Former Member

Item - The item is not a user-defined item [66000-8] SAP B1

Dim oDataTable As SAPbouiCOM.DataTable = Nothing

Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent = Nothing '

Dim oChooseFromList As SAPbouiCOM.ChooseFromList = Nothing '

Dim sChooseFromListUID As String = String.Empty

Dim oDBDataSource As SAPbouiCOM.DBDataSource = Nothing Dim strPrjCode As String = String.Empty '

Dim strPrjName As String = String.Empty

Try oDBDataSource = oForm.DataSources.DBDataSources.Item(oDataSource)

If pVal.ActionSuccess Then

oCFLEvento = DirectCast(pVal, SAPbouiCOM.IChooseFromListEvent)

oCFLEvento = pVal oDataTable = oCFLEvento.SelectedObjects

If oDataTable Is Nothing Then Exit Sub

If Not oDataTable Is Nothing And pVal.BeforeAction = False Then

For i As Integer = 0 To oDataTable.Rows.Count - 1 If oDataTable.Rows.Count = 1 Then

With oDBDataSource If Not String.IsNullOrEmpty(getColName) Then

strPrjCode = oDataTable.GetValue(getColName, i) .SetValue(prjCodeAlias, i, strPrjCode.Trim())

End If

End With

End If

Exit For

Next

End If

End If

Catch ex As Exception

Finally

End Try

End Sub

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 23, 2017 at 01:30 PM

    It seems you are setting the DataTable value which comes from the ChooseFromList, I believe that you want to set your DataSource,

    strPrjCode  = oDataTable.GetValue(getColName, i) 
    oDBDataSource.SetValue(prjCodeAlias, i, strPrjCode.Trim())
    Add comment
    10|10000 characters needed characters exceeded