---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# OCRotaMember - Global

# OCRotaMember - Global {#ariaid-title1}

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) {#ariaid-title2}

Deactivates the user's rota member records according to the deactivate
date.
{#r_OCRotaMember-deactivateUser_String_GDT__table_x21_cmg_hx__entry__3}

| Name | Type | Description |
|-|-|-|
| userId | String | The sys id of the user. |
| deactivateDate | GlideDateTime | The date from which the user's rotation is deactivated. |
[Table 1. Parameters]

{#r_OCRotaMember-deactivateUser_String_GDT__table_x21_cmg_hx} {#r_OCRotaMember-deactivateUser_String_GDT__table_y21_cmg_hx__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 2. Returns]

{#r_OCRotaMember-deactivateUser_String_GDT__table_y21_cmg_hx}

## OCRotaMember - hasChanged (GlideRecord current, GlideRecord previous) {#ariaid-title3}

Checks whether the cmn_rota_member record has changed. Checks the Member, From, To, and
Order fields have changed.
{#r_OCRotaMember-hasChanged_GR_GR__table_udq_mng_hx__entry__3}

| 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 3. Parameters]

{#r_OCRotaMember-hasChanged_GR_GR__table_udq_mng_hx} {#r_OCRotaMember-hasChanged_GR_GR__table_vdq_mng_hx__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 4. Returns]

{#r_OCRotaMember-hasChanged_GR_GR__table_vdq_mng_hx}

## OCRotaMember - hasOrderChanged (GlideRecord current, GlideRecord previous) {#ariaid-title4}

On update of a cmn_rota_member record, checks whether the order of the record has
changed.
{#r_OCRotaMember-hasOrderChanged_GR_GR__table_fpk_tmg_hx__entry__3}

| 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 5. Parameters]

{#r_OCRotaMember-hasOrderChanged_GR_GR__table_fpk_tmg_hx} {#r_OCRotaMember-hasOrderChanged_GR_GR__table_gpk_tmg_hx__entry__2}

| Type | Description |
|-|-|
| Boolean | Returns true if the order has changed. |
[Table 6. Returns]

{#r_OCRotaMember-hasOrderChanged_GR_GR__table_gpk_tmg_hx}

## OCRotaMember - recalculate (GlideRecord current, GlideRecord previous) {#ariaid-title5}

Recalculates the schedule for the cmn_rota_member record.
{#r_OCRotaMember-recalculate_GR_GR__table_rhm_d4g_hx__entry__3}

| 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 7. Parameters]

{#r_OCRotaMember-recalculate_GR_GR__table_rhm_d4g_hx} {#r_OCRotaMember-recalculate_GR_GR__table_shm_d4g_hx__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 8. Returns]

{#r_OCRotaMember-recalculate_GR_GR__table_shm_d4g_hx}

## OCRotaMember - validateDates (String from, String to) {#ariaid-title6}

Ensures that the From date occurs before or on the same date as the To
date.
{#r_OCRotaMember-validateDates_String_String__table_vzd_fng_hx__entry__3}

| Name | Type | Description |
|-|-|-|
| from | String | Formatted date/ |
| to | String | Formatted date/ |
[Table 9. Parameters]

{#r_OCRotaMember-validateDates_String_String__table_vzd_fng_hx} {#r_OCRotaMember-validateDates_String_String__table_wzd_fng_hx__entry__2}

| Type | Description |
|-|-|
| Boolean | Returns true if the From date is before or on same date as To date. |
[Table 10. Returns]

{#r_OCRotaMember-validateDates_String_String__table_wzd_fng_hx}

