[英]openbravo callout to use OBDal.getInstance .save Not working
I Have Applied Logic on all the row which i get in the list in eclipse console i got the correct result everything is fine ,but now i just want to set the value again here my code in openbravo callout我在 eclipse 控制台列表中的所有行上都应用了逻辑我得到了正确的结果一切都很好,但现在我只想在这里再次设置我的代码在 openbravo 标注中的值
for (ShipmentType st_op : cp.getOCAShipmentTypeList()) {
String val = st_op.getName().substring(0, 3);
System.out.println(val);
Exist = val.concat(String.valueOf(CountTot));
System.out.println("Existing Value Change : " + Exist);
st_op.setName(Exist);
OBDal.getInstance().save(st_op);
}
here is a result cosole after adding 3 rd record :这是添加第 3 条记录后的结果 cosole:
2011
2
4022
3
201
Existing Value Change : 2013
402
Existing Value Change : 4023
3
4H
3
3
4H33
I just can'nt set and save with OBDal我只是无法使用 OBDal 进行设置和保存
OBDal.getInstance().save(st_op);
I Got my Work Done By Statement as:我通过声明完成了我的工作:
ShipmentType st = OBProvider.getInstance().get(ShipmentType.class);
for (ShipmentType st_op : cp.getOCAShipmentTypeList()) {
String val = st_op.getName().substring(0, 3);
System.out.println(val);
Exist = val.concat(String.valueOf(CountTot));
System.out.println("Existing Value Change : " + Exist);
st_op.setName(Exist);
}
OBDal.getInstance().save(st);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.