Hi All,
Below you will find a snippet to get department for the current user.
select OMOperatingUnit
join HcmPositionDetail
where OMOperatingUnit.RecId == HcmPositionDetail.Department
join HcmPosition
where HcmPositionDetail.Position == HcmPosition.RecId
join HcmPositionWorkerAssignment
where HcmPosition.RecId == HcmPositionWorkerAssignment.Position
join HcmWorker
where HcmPositionWorkerAssignment.Worker == HcmWorker.RecId
join DirPerson
where HcmWorker.Person == DirPerson.RecId
join DirPersonUser
where DirPersonUser.PersonParty == DirPerson.RecId
&& DirPersonUser.User == curUserId();
No comments:
Post a Comment