Sunday, July 3, 2016

Finding Modified Element in SQL DB model Store AX

// Finding Modified Element in SQL DB model
select E.[Name] as [Element Name],
EY.[ElementTypeName] as [Element Type],
E1.[Name] as [Root Element Name],
EY1.[ElementTypeName] as [Root Element Type],
ED.[LayerId],
L.[Name] as [Layer Name],
ED.[MODIFIEDDATETIME],
ED.[MODIFIEDBY],
ED.[CREATEDDATETIME],
ED.[CREATEDBY],
ED.[ElementVersion],
ED.[ModelId]
from [ModelElement] as E
inner join [ModelElementData] as ED on E.[ElementHandle] = ED.[ElementHandle]
inner join [ModelElement] as E1 on E1.[ElementHandle] = E.[RootHandle]
inner join [ElementTypes] as EY on EY.[ElementType] = E.[ElementType]
inner join [ElementTypes] as EY1 on EY1.[ElementType] = E1.[ElementType]
inner join [Layer] as l on l.[Id] = ED.[LayerId]
where ED.[LayerId] = 10 and ED.MODIFIEDDATETIME > '2016-04-26 05:51:01.000'
-- 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...