Tuesday, May 17, 2022

Valid time state table in D365 FO

hcmPositionWorkerAssignment HcmPositionWorkerAssignmentLocal;

utcdatetime                 _validFrom = DateTimeUtil::utcNow();

select firstonly ValidTimeState(_validFrom) hcmPositionWorkerAssignmentLocal

    where hcmPositionWorkerAssignmentLocal.Worker == worker