Monday, August 28, 2017

Get Report to Position

HcmPositionRecId                        SelfPosition;
HcmPositionHierarchy                    PositionHierarchy;
uctdatetime utcDT = dtatimeutlill::;
SelfPosition = HcmPositionWorkerAssignment::find(HcmWorkerPrimaryPosition::findByWorker(HcmWorker::findByPerson("current person").RecId).PositionAssignment).Position;
    select validTimeState(utcDT) PositionHierarchy
    where PositionHierarchy.Position  == SelfPosition  && PositionHierarchy.PositionHierarchyType != 0;
    report to postion = HcmWorker::find(HcmWorkerPrimaryPosition::findByPositionAssignment(HcmPositionWorkerAssignment::findByPosition(PositionHierarchy.ParentPosition).RecId).Worker).Person;

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...