OCRotaMember - Global

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.

표 1. Parameters
Name Type Description
userId String The sys id of the user.
deactivateDate GlideDateTime The date from which the user's rotation is deactivated.
표 2. Returns
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.

표 3. Parameters
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.
표 4. Returns
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.

표 5. Parameters
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.
표 6. Returns
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.

표 7. Parameters
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.
표 8. Returns
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.

표 9. Parameters
Name Type Description
from String Formatted date/
to String Formatted date/
표 10. Returns
Type Description
Boolean Returns true if the From date is before or on same date as To date.