HcmEmployment::findByWorkerLegalEntity Method
Finds a record in the HcmEmployment table by using the specified Worker and LegalEntity values.
Syntax
client server public static HcmEmployment findByWorkerLegalEntity(
HcmWorkerRecId _worker,
CompanyInfoRecId _legalEntity,
[utcdatetime _validFrom,
utcdatetime _validTo,
boolean _forUpdate,
ConcurrencyModel _concurrencyModel])
Run On
Called
Parameters
- _worker
Type: HcmWorkerRecId Extended Data Type
The value of the Worker field to find.
- _legalEntity
Type: CompanyInfoRecId Extended Data Type
The value of the LegalEntity field to find.
- _validFrom
Type: utcdatetime
A ValidFrom field value.
- _validTo
Type: utcdatetime
A ValidTo field value.
- _forUpdate
Type: boolean
A Boolean value that indicates whether to read the record for update; optional.
- _concurrencyModel
Type: ConcurrencyModel Enumeration
The concurrency model option to use when the record is read; optional.
Return Value
Type: HcmEmployment Table
A record in the HcmEmployment table; otherwise, an empty record.
Remarks
Values for the _validFrom and _validTo values limit the table selection in the following way:
If no values are supplied for the parameters, the current date is used. Therefore, the method searches for only active records and returns either an empty record or a valid record.
If only the first parameter value is supplied, the second parameter is set to the first parameter. The method searches for active records as of the supplied date and time value and returns either an empty record or a valid record.
If both parameters are supplied with values, the method searches for records whose validFrom and ValidTo values fall in that interval. The method can return multiple records.