Get worker current company using x++.
HcmWorker hcmWorker;
HcmEmployment hcmEmployment;
utcdatetime now = DateTimeUtil::utcNow();
CompanyInfo companyInfo;
select ValidTimeState(now) hcmEmployment
join hcmWorker
where hcmWorker.RecId == hcmEmployment.Worker
&& hcmWorker.PersonnelNumber == ''
join companyInfo where companyInfo.RecId == hcmEmployment.LegalEntity;
Keep Daxing!!
No comments:
Post a Comment