新添加的行不会立即反映在 SAP B1 中的 UI 上

问题描述

当我向数据库添加新行并调用 loadfromdatasource 方法时,它没有反映。我需要重新登录以检查新添加的行。如何立即刷新矩阵中的数据?

代码

oUserTable.Code = "Temp1";    oUserTable.UserFields.Fields.Item("U_barcode").Value = oEditTxt.String;    oUserTable.UserFields.Fields.Item("U_keyword").Value = oEditTxt1.String;    oUserTable.UserFields.Fields.Item("U_pdocentry").Value = DocEntry;    oUserTable.UserFields.Fields.Item("U_pobjtype").Value = "17";    int i = oUserTable.Add();  SAPbouiCOM.Form oForm = Application.SBO_Application.OpenForm(SAPbouiCOM.BoFormObjectEnum.fo_Order,"",DocEntry.ToString());    if (i != 0){    oApp.SetStatusBarMessage("Error" + oCompany.GetLastErrorDescription(),SAPbouiCOM.BoMessageTime.bmt_Medium,false); }else{    oApp.SetStatusBarMessage("Successfully inserted data" + oCompany.GetLastErrorDescription(),false); oMatrix.LoadFromDataSource();}}}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)