OCRotaMember - Global

The OCRotaMember API performs maintenance operations on the cmn_rota_member table.

OCRotaMember - deactivateUser (String userId, GlideDateTime deactivateDate)

Deactivates the user's rota member records according to the deactivate date.

Table 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.
Table 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.

Table 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.
Table 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.

Table 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.
Table 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.

Table 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.
Table 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.

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