ProjReserveResource::releaseWorkerByEmploymentDates Method [AX 2012]

Method to release a worker bookings by the worker employment end date accross all companies.

server public static void releaseWorkerByEmploymentDates(
    HcmWorkerRecId _worker, 
    CompanyInfoRecId _workerLE, 
    HcmEmploymentValidFrom _employmentFromDate, 
    HcmEmploymentValidTo _employmentToDate)

Run On

Server

Parameters

_worker
Type: HcmWorkerRecId Extended Data Type
HcmWorker recId.
_workerLE
Type: CompanyInfoRecId Extended Data Type
Worker leagle entity recId.
_employmentFromDate
Type: HcmEmploymentValidFrom Extended Data Type
Worker HcmEmployment teable from date.
_employmentToDate
Type: HcmEmploymentValidTo Extended Data Type
Worker HcmEmployment to date.

This method will determine the last day of scheduling and call it as schedulingEndDate variable. Beyond this day, the worker scheduling reservation records will be removed.

It determines the scheudlingEndDate depending on the worker HcmEmploymentValidFrom and HcmEmploymentValidTo date. schedulingEndDate should never be smaller than today.

Show: