我正在尝试找出用户对crm的最新用法。查询我在下面使用+结果。我的问题是,在晚于64、65的情况下怎么会有动作(33、34、35、36)?我假设与该应用程序的任何用户交互都将记录为64或65,但显然并非如此。我们还在这里使用Outlook插件。我在做什么错了?
-- all latest actions by user
select us.FullName, max(a.CreatedOn) as LatestActionDate, a.Action as
ActionNumber,
case
when a.Action = 1 then 'Create'
when a.Action = 2 then 'Update'
when a.Action = 33 then 'Associate Entities'
when a.Action = 34 then 'Disassociate Entities'
when a.Action = 35 then 'Add Members'
when a.Action = 36 then 'Remove Members'
when a.Action = 64 then 'User Access via Web'
when a.Action = 65 then 'User Access via Web Services'
else ''
end as ActionName,
case
when us.IsDisabled = 0 then 'Active'
when us.IsDisabled = 1 then 'Inactive'
else ''
end as UserStatus
, us.CreatedOn, us.ModifiedOn
from Audit a
inner join SystemUser us on a.ObjectId = us.SystemUserId
where
us.FullName like '<userX fullname>'
group by us.FullName, a.Action, us.IsDisabled, us.CreatedOn, us.ModifiedOn
我得到这个答复