Sunday, March 26, 2017

Get Modified object or attributed user list by layer wise for specify AX table and Method

//Get Modified object or attributed user list by layer wise for specify AX table and Method

//SQL query

-- start Query

SELECT p.[Name] AS Element
    ,c.[Name] AS ChildNode
    ,d.[MODIFIEDDATETIME]
    ,d.[MODIFIEDBY]
    ,d.[ModelId]
    ,m.[Name] AS modelName
  FROM [AX1QA_model].[dbo].[ModelElement] p
  JOIN [AX1QA_model].[dbo].[ModelElement] c ON c.ParentHandle = p.ElementHandle
  JOIN [AX1QA_model].[dbo].[ModelElementData] d ON d.ElementHandle = c.ElementHandle
   --and d.LayerId = 10 //Var
  JOIN [AX1QA_model].[dbo].[ModelManifest] m ON m.ModelId = d.ModelId
  WHERE p.AxId = 177 --Table id in AX table
  AND c.Name = 'costValue' --Sample - Method which you want to track
  ORDER BY d.LayerId

--End Code

Layer Id
-- Id Name
-- 0 SYS
-- 1 SYP
-- 2 GLS
-- 3 GLP
-- 4 FPK
-- 5 FPP
-- 6 SLN
-- 7 SLP
-- 8 ISV
-- 9 ISP
--10 VAR
--11 VAP
--12 CUS
--13 CUP
--14 USR
--15 USP

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...