0

我想获取文档类型。我该怎么做呢?我想添加一个单独的列,它将给出销售订单、采购订单等文档类型。第一行给我错误应该触发什么查询。请帮助我是 ERP Next 的新手。

SELECT
    AD.ref_doctype AS “Doctype:Link/User:120”,
    AD.name AS “Doc#:Link/Doctype:120”,
    AD.owner AS “Created By:Link/User:120”,
    AD.modified AS “Modified On:Date:120”
FROM tabAddress AS AD

WHERE
    DATEDIFF(now(),AD.modified) BETWEEN 1 AND 30

UNION ALL

SELECT
    TR.name AS “Doc#:Link/Doctype:120”,
    TR.owner AS “Created By:Link/User:120”,
    TR.modified AS “Modified On:Date:120”
FROM tabTax Rule AS TR
WHERE
    DATEDIFF(now(),TR.modified) BETWEEN 1 AND 30

UNION ALL

SELECT
    IT.name AS “Doc#:Link/Doctype:120”,
    IT.owner AS “Created By:Link/User:120”,
    IT.modified AS “Modified On:Date:120”
FROM tabItem AS IT
WHERE
    DATEDIFF(now(),IT.modified) BETWEEN 1 AND 30
4

2 回答 2

0
于 2019-12-14T11:03:47.110 回答
0

要获取文档类型名称,您必须提供链接的文档类型名称,例如,选择 IT.name 作为“IT No:Link/IT:120”

于 2019-12-09T08:51:52.860 回答