Epicor Function中保存表数据
1. 函数库中DB访问代码设置为读写 DB Access from Code option should be Read Write

2.参考表单引用中标记可更新 Table reference should be marked as updatable

3. 代码中调用Db.SaveChanges()保存到数据库,To save changes in the code you need to use Db.SaveChanges() method.

提醒
如果不勾选第二步表的可更新,调用Db.SaveChagnes()会报错:
Epicor 自定义function中Db无法SaveChanges()报错,System.Drawing.Bitmap CS1061 “ILibraryContext”未包含“SaveChanges”的定义,并且找不到可接受第一个“ILibraryContext”类型参数的可访问扩展方法“SaveChanges”(是否缺少 using 指令或程序集引用?)
参考:Any way to write to DB from a function? - Epicor ERP 10 - Epicor User Help Forum
版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
epicor 张国生


