{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1078,"path":"api-reference/server-api-reference/c_OCRotaMemberAPI.md","title":"OCRotaMember - Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# OCRotaMember- Global\n\nThe OCRotaMember script include provide methods to perform maintenance operations on the On-call Member \\[cmn\\_rota\\_member\\] table.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## OCRotaMember - deactivateUser \\(String userId, GlideDateTime deactivateDate\\)\n\nDeactivates the user's rota member records according to the deactivate date.\n\n|Name|Type|Description|\n|----|----|-----------|\n|userId|String|The sys id of the user.|\n|deactivateDate|GlideDateTime|The date from which the user's rotation is deactivated.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## OCRotaMember - hasChanged \\(GlideRecord current, GlideRecord previous\\)\n\nChecks whether the cmn\\_rota\\_member record has changed. Checks the Member, From, To, and Order fields have changed.\n\n|Name|Type|Description|\n|----|----|-----------|\n|current|GlideRecord|The latest changes made to the cmn\\_rota\\_member record.|\n|previous|GlideRecord|The original state of the cmn\\_rota\\_member record.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## OCRotaMember - hasOrderChanged \\(GlideRecord current, GlideRecord previous\\)\n\nOn update of a cmn\\_rota\\_member record, checks whether the order of the record has changed.\n\n|Name|Type|Description|\n|----|----|-----------|\n|current|GlideRecord|The latest changes made to the cmn\\_rota\\_member record.|\n|previous|GlideRecord|The original state of the cmn\\_rota\\_member record.|\n\n|Type|Description|\n|----|-----------|\n|Boolean|Returns true if the order has changed.|\n\n## OCRotaMember - recalculate \\(GlideRecord current, GlideRecord previous\\)\n\nRecalculates the schedule for the cmn\\_rota\\_member record.\n\n|Name|Type|Description|\n|----|----|-----------|\n|current|GlideRecord|The latest changes made to the cmn\\_rota\\_member record.|\n|previous|GlideRecord|The original state of the cmn\\_rota\\_member record.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n## OCRotaMember - validateDates \\(String from, String to\\)\n\nEnsures that the From date occurs before or on the same date as the To date.\n\n|Name|Type|Description|\n|----|----|-----------|\n|from|String|Formatted date/|\n|to|String|Formatted date/|\n\n|Type|Description|\n|----|-----------|\n|Boolean|Returns true if the From date is before or on same date as To date.|\n\n"}}