Hi
There are 5 records in a Grid , but it is adding only one record. Secondly Amount value is not getting updated in Database.
Dim oUsrTbl As SAPbobsCOM.UserTable = oCompany.UserTables.Item("M_TEMP")
Dim oForm As SAPbouiCOM.Form = Me.SBO_Application.Forms.Item(BusinessObjectInfo.FormUID)
Dim oDT As SAPbouiCOM.DataTable = oGrid.DataTable
Dim i As Integer
For i = 0 To oDT.Rows.Count - 1
oUsrTbl.Code = oForm.Items.Item("txtcode").Specific.value.ToString()
oUsrTbl.Name = oForm.Items.Item("txtcode").Specific.value.ToString()
oUsrTbl.UserFields.Fields.Item("U_Unique_ID").Value = oForm.Items.Item("33").Specific.value.ToString()
oUsrTbl.UserFields.Fields.Item("U_Amount").Value = oDT.GetValue("Amount", i)
If oUsrTbl.Add = 0 Then
SBO_Application.MessageBox(" Added")
'GC.Collect()
End If
Next
Thanks