Create New Field in EcoResProductCreate form

在物料主数据中增加字段(TEK_ItemCustomer),想在新增物料界面就填写数据,因为Form字段并未映射到具体表,故需要通过Form方法createData2Controls进行映射,添加如下代码:

//Added by Danzel 2021/5/10  Patch:Released products/New product
[tableStr(InventTable),[[fieldNum(InventTable, TEK_ItemCustomer), formControlStr(EcoResProductCreate, TEK_ItemCustomer)]]],
//Added by Danzel 2021/5/10  end

createData2Controls增加了判断,具体没弄清楚判断的含义,测试服发现if内部增加代码未生效,猜测其他新增物料界面,else的新增入口为:Released products/New product

Check createData2Controls() and writeMoreFields() methods on EcoResProductCreate form. If you add control to the form, you should map it with table field in the first method, that should help.

For now, take a look how it's done in createData2Controls() and add your field. I guess, you have added new field in InventTable so you must map it with form control providing table name (tableStr(InventTable)), field id fieldNum(InventTable, your field) and form control name (formControlStr(EcoResProductCreate, your control) - remember to set AutoDeclaration to Yes).

参考:https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/237749/create-new-field-in-ecoresproductcreate-form

    Danzel
    Danzel管理员

    • 声明:本文由Danzel于2021-05-10原创发表在MaryD,转载须经本站同意。
    • 本文地址:http://maryd.cn/?id=167
    上一篇:Dynamics ax 2012 获取默认汇率表
    下一篇:一个git项目多个仓库地址及报错处理

    留言评论

    暂无留言
    取消
    扫码支持