VendInvoiceJour.InvoiceAccount <- VendTable.AccountNum 关系

发布于 2024-09-01 02:07:13 字数 771 浏览 3 评论 0 原文

我有以下情况: 我需要加入 VendInvoiceJour.InvoiceAccount <- VendTable.AccountNum 并采用 VendTable.Vendgroup。 在所有情况下(查询,甚至视图)Dynamics ax 连接表 VendInvoiceJour.OrderAccount<- VendTable.AccountNum 不 VendInvoiceJour.InvoiceAccount <- VendTable.AccountNum。 我正在尝试使用这种查询:

qBdSVendJour = element.query().dataSourceTable(tablenum(VendInvoiceJour));
qBdSVendTbl = qBdSVendJour.addDataSource(tablenum(VendTable));
qBdSVendTbl.relations(true);
qBdSVendTbl.joinMode(JoinMOde::InnerJoin);
qBdSVendTbl.fetchMode(QueryFetchMode::One2One);

qBdSVendTbl.addLink(
    FieldNum(VendInvoiceJour,InvoiceAccount)
    ,FieldNum(VendTable,AccountNum)
); //(Dynamics ax automatically corrects InvoiceAccount to orderaccount 
   //in reports if trying this link in morphx)

I have following situation:
I need to join VendInvoiceJour.InvoiceAccount <- VendTable.AccountNum and take VendTable.Vendgroup.
In all cases (queries,or even views) Dynamics ax joins tables VendInvoiceJour.OrderAccount<- VendTable.AccountNum not
VendInvoiceJour.InvoiceAccount <- VendTable.AccountNum.
I`m trying to use this kind of query:

qBdSVendJour = element.query().dataSourceTable(tablenum(VendInvoiceJour));
qBdSVendTbl = qBdSVendJour.addDataSource(tablenum(VendTable));
qBdSVendTbl.relations(true);
qBdSVendTbl.joinMode(JoinMOde::InnerJoin);
qBdSVendTbl.fetchMode(QueryFetchMode::One2One);

qBdSVendTbl.addLink(
    FieldNum(VendInvoiceJour,InvoiceAccount)
    ,FieldNum(VendTable,AccountNum)
); //(Dynamics ax automatically corrects InvoiceAccount to orderaccount 
   //in reports if trying this link in morphx)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

So尛奶瓶 2024-09-08 02:07:13

如果删除该行:

  *qBdSVendTbl.relations(true);*

那么您将不需要添加:

  *BdSVendJour.clearDynalink();*

要确保实际查询是预期的打印内容:

  *qBdSVendJour.toString();*

If you remove the line:

  *qBdSVendTbl.relations(true);*

then you won't need to add:

  *BdSVendJour.clearDynalink();*

To be sure that the actual query is the expected print the conent of:

  *qBdSVendJour.toString();*
公布 2024-09-08 02:07:13

qBdSVendJour.clearDynalink() 就可以了。

qBdSVendJour.clearDynalink() will do the trick.

痞味浪人 2024-09-08 02:07:13

我相信语句 qBdSVendTbl.relations(true) 将使 AX 评估相关表上定义的关系并无论如何使用它们。

I believe the statement qBdSVendTbl.relations(true) will have AX evaluate the defined relations on the tables in question and use them regardless.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文