HcmNumberOfWorkersDP.numberOfWorkers Method [AX 2012]
Calculates the number of unique workers for a given department and its children.
Syntax
public HRMNumberOfEmployees numberOfWorkers(
[boolean _countChildren,
boolean _includeContractors,
OMDepartmentRecId _departmentRecId,
utcdatetime _perDateTime])
Run On
Server
Parameters
- _countChildren
Type: boolean
A Boolean value that indicates whether to include child departments in the worker total; optional.
- _includeContractors
Type: boolean
A Boolean value that indicates whether to include contract workers in the worker total; optional.
- _departmentRecId
Type: OMDepartmentRecId Extended Data Type
The record ID of an OMOperatingUnit record to calculate the worker total.
- _perDateTime
Type: utcdatetime
An as-of UtcDateTime value upon which to base date range selections.
Return Value
Type: HRMNumberOfEmployees Extended Data Type
The total number of workers for a department or department and its children.
Remarks
Workers can be affiliated to multiple positions across multiple departments, but the intent of this method is to provide the unique number of employees, regardless of this fact.