SimpleDelegation
This server class provides methods for interaction with the delegation records.
getDelegatesOfType()
Use this method to return an array of delegates.
Parameter(s):
Name | Type | Mandatory | Default value |
---|---|---|---|
type | String | Y | N Possible values:
|
delegatorId | String | Y | N |
fromDateTime | SimpleDateTime object | N | N |
toDateTime | SimpleDateTime object | N | N |
Return:
Type | Description |
---|---|
Array of SimpleRecords | This method returns an array of delegates. |
Example:
getDelegatesOfType()
let simpleDelegation = new SimpleDelegation();
let result = simpleDelegation.getDelegatesOfType('approvals', '166116760014825307');
setResult(result);
getDelegatorsOfType()
Use this method to return an array of the employees that delegate authority.
Parameter(s):
Name | Type | Mandatory | Default value |
---|---|---|---|
type | String | Y | N Possible values:
|
delegateId | String | Y | N |
fromDateTime | SimpleDateTime object | N | N |
toDateTime | SimpleDateTime object | N | N |
Return:
Type | Description |
---|---|
Array of SimpleRecords | This method returns an array of the employees that delegate their responsibilities. |
Example:
getDelegatorsOfType()
let simpleDelegation = new SimpleDelegation();
let result = simpleDelegation.getDelegatorsOfType('tasks', '166116760014825307');
setResult(result);
hasDelegationOfType()
Use this method to verify if there is a specific delegation record.
Parameter(s):
Name | Type | Mandatory | Default value |
---|---|---|---|
type | String | Y | N Possible values:
|
delegatorIds | Array of Strings | Y | N |
delegateId | String | Y | N |
fromDateTime | SimpleDateTime object | N | N |
toDateTime | SimpleDateTime object | N | N |
Return:
Type | Description |
---|---|
Boolean | This method returns true if the delegation record with the specified value of the parameters exists. Otherwise, it returns false. |
Example:
hasDelegationOfType()
let simpleDelegation = new SimpleDelegation();
let result = simpleDelegation.hasDelegationOfType('access', ['166116760014825307'], '165951644312968191');
setResult(result);