OCRotaMember - Global
-
- UpdatedJan 30, 2025
- 1 minute read
- Yokohama
- API reference
The OCRotaMember script include provide methods to perform maintenance operations on the On-call Member [cmn_rota_member] table.
OCRotaMember - deactivateUser (String userId, GlideDateTime deactivateDate)
Deactivates the user's rota member records according to the deactivate date.
Name | Type | Description |
---|---|---|
userId | String | The sys id of the user. |
deactivateDate | GlideDateTime | The date from which the user's rotation is deactivated. |
Type | Description |
---|---|
void |
OCRotaMember - hasChanged (GlideRecord current, GlideRecord previous)
Checks whether the cmn_rota_member record has changed. Checks the Member, From, To, and Order fields have changed.
Name | Type | Description |
---|---|---|
current | GlideRecord | The latest changes made to the cmn_rota_member record. |
previous | GlideRecord | The original state of the cmn_rota_member record. |
Type | Description |
---|---|
void |
OCRotaMember - hasOrderChanged (GlideRecord current, GlideRecord previous)
On update of a cmn_rota_member record, checks whether the order of the record has changed.
Name | Type | Description |
---|---|---|
current | GlideRecord | The latest changes made to the cmn_rota_member record. |
previous | GlideRecord | The original state of the cmn_rota_member record. |
Type | Description |
---|---|
Boolean | Returns true if the order has changed. |
OCRotaMember - recalculate (GlideRecord current, GlideRecord previous)
Recalculates the schedule for the cmn_rota_member record.
Name | Type | Description |
---|---|---|
current | GlideRecord | The latest changes made to the cmn_rota_member record. |
previous | GlideRecord | The original state of the cmn_rota_member record. |
Type | Description |
---|---|
void |
OCRotaMember - validateDates (String from, String to)
Ensures that the From date occurs before or on the same date as the To date.
Name | Type | Description |
---|---|---|
from | String | Formatted date/ |
to | String | Formatted date/ |
Type | Description |
---|---|
Boolean | Returns true if the From date is before or on same date as To date. |
On this page
- OCRotaMember - deactivateUser (String userId, GlideDateTime deactivateDate)
- OCRotaMember - hasChanged (GlideRecord current, GlideRecord previous)
- OCRotaMember - hasOrderChanged (GlideRecord current, GlideRecord previous)
- OCRotaMember - recalculate (GlideRecord current, GlideRecord previous)
- OCRotaMember - validateDates (String from, String to)