hi all
i am trying to add some values into an udo, so b1 gives this
"MasterData Type UserTable can not add row"
this is the code
what's wrong?
UserTable oUst = (UserTable)B1Connections.diCompany.UserTables.Item("SPBZ_CONFIG_ONE");
for (int i = 0; i < dtTable.Rows.Count; i++)
{
if (oUst.GetByKey(dtTable.Rows<i>["Code"].ToString()) == false)
{
oUst.Code = dtTable.Rows<i>["Code"].ToString();
oUst.Name = dtTable.Rows<i>["Name"].ToString();
oUst.UserFields.Fields.Item("U_Ativ").Value = "Y";
oUst.Add();
}
}
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUst);