1

我在 AX 2012 R3 CU10 上。

我需要以 XML 格式导出 Items 数据。

我创建了一个基于服务操作的出站 AIF 端口EcoResProductService.read
在选择数据策略时,AX 不允许我取消选中/EcoResProduct/Product/Translation/LanguageId(灰色)复选框,因为这是基础表中的必填字段。
这可以通过将其添加到initMandatoryFieldsExemptionListAxBC 类的方法来覆盖。这里的例子

所以,我已经覆盖了它\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 的豁免?

4

1 回答 1

3

您需要让系统更新 AIF 模式表。您可以通过右键单击 AOT 中服务下的服务并单击加载项/注册服务来执行此操作,或者打开 AifService 表单并单击刷新按钮以更新所有服务。

于 2016-12-22T15:37:07.600 回答