我在 AX 2012 R3 CU10 上。
我需要以 XML 格式导出 Items 数据。
我创建了一个基于服务操作的出站 AIF 端口EcoResProductService.read
。
在选择数据策略时,AX 不允许我取消选中/EcoResProduct/Product/Translation/LanguageId
(灰色)复选框,因为这是基础表中的必填字段。
这可以通过将其添加到initMandatoryFieldsExemptionList
AxBC 类的方法来覆盖。这里的例子
所以,我已经覆盖了它\Classes\AxEcoResProductTranslation\initMandatoryFieldsExemptionList
protected void initMandatoryFieldsExemptionList()
{
super();
// LanguageId not mandatory
this.setParmMethodAsNotMandatory(methodstr(AxEcoResProductTranslation,parmLanguageId));
}
但是,此后数据策略中的复选框仍然灰显。
我尝试过的事情:
AxBC
修改类的正向编译- 增量 CIL
- 重启 AOS
- AX 客户端配置 > 选项卡:连接 > 按钮:刷新配置
当我将我的代码与标准代码(如 on )进行比较时AxAssetTable
,那里initMandatoryFieldsExemptionList
已实现并正常工作。
AssetId
在该数据策略中未显示为灰色。
有谁知道如何让 AX “看到”我对 LanguageId 的豁免?