You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法为D365 Finance and Operations添加可见的Directory包引用

Dynamics 365 Finance and Operations 引用DirPartyTable 问题解决方法

核心误区澄清

你混淆了**模型(Model)和包(Package)**的概念:Application Explorer里看到的Directory (Directory)是模型,而DirPartyTable实际属于Application Platform模型下的Dir包,所以你在Update Model Parameters里找不到名为Directory的包是正常的。

正确添加包引用步骤

  • 右键你的自定义模型,选择Properties,打开Model Parameters面板
  • 切换到Package References标签页,点击Add按钮
  • 在搜索框输入Dir,找到归属为Application Platform的Dir包,选中后添加
  • 保存设置,重新编译项目

编译失败的额外排查点

  • 确认自定义表Patron中引用DirPartyTable的语法正确,示例代码:
    [ForeignKey(tableStr(DirPartyTable))]
    public DirPartyNumber PartyNumber;
    
  • 若需调用DirPartyTable的相关方法,可能还要补充引用Application Platform下的DirCore包
  • 执行清理操作(右键项目 > Clean)后,再重新生成解决方案(Build > Rebuild Solution)

避坑提示

不要盲目引用带“Directory”字样的其他包(如Security、Reports),这些包不包含DirPartyTable的定义,只会引入无效依赖导致编译错误。

内容的提问来源于stack exchange,提问作者Crippledsmurf

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.17 19:02:41