OCRosterSpanApprovalUtil - Global

The OCRosterSpanApprovalUtil API for the PTO approval feature.

OCRosterSpanApprovalUtil - approvePTOSpan (GlideRecord rosterSpanGr)

Changes the type of the roster_schedule_span to time-off from approval.

Table 1. Parameters
Name Type Description
rosterSpanGr GlideRecord A roster_schedule_span_proposal record.
Table 2. Returns
Type Description
void

OCRosterSpanApprovalUtil - getContextualCalUrlPerSpanProposal (GlideRecord rosterSpanProposalGr)

Returns a URL to the on-call calendar based on the rosterSpanProposalGr.

Table 3. Parameters
Name Type Description
rosterSpanProposalGr GlideRecord A roster_schedule_span_proposal record.
Table 4. Returns
Type Description
String A URL to the on-call calendar based on the rosterSpanProposalGr.

OCRosterSpanApprovalUtil - getFromDateDisplayValuePerSpanProposal (GlideRecord rosterSpanProposalGr)

Returns a formatted GlideScheduleDateTime string based on the start date of the rosterSpanProposalGr.

Table 5. Parameters
Name Type Description
rosterSpanProposalGr GlideRecord A roster_schedule_span_proposal record.
Table 6. Returns
Type Description
String A formatted GlideScheduleDateTime string based on the start date of the rosterSpanProposalGr.

OCRosterSpanApprovalUtil - getPTOApproversList (GlideRecord rosterSpanProposalGr)

Returns an array of group managers based on the user's rota groups.

Table 7. Parameters
Name Type Description
rosterSpanProposalGr GlideRecord A roster_schedule_span_proposal record.
Table 8. Returns
Type Description
Array An array of group managers based on the user's rota groups.

OCRosterSpanApprovalUtil - getToDateDisplayValuePerSpanProposal (rosterSpanProposalGr GlideRecord)

Returns a formatted GlideScheduleDateTime string based on the end date of the rosterSpanProposalGr.

Table 9. Parameters
Name Type Description
rosterSpanProposalGr GlideRecord A roster_schedule_span_proposal record.
Table 10. Returns
Type Description
String A formatted GlideScheduleDateTime string based on the end date of the rosterSpanProposalGr.

OCRosterSpanApprovalUtil - getUserNamePerSpanProposal (GlideRecord rosterSpanProposalGr)

Returns the user's name based on rosterSpanProposalGr.

Table 11. Parameters
Name Type Description
rosterSpanProposalGr GlideRecord A roster_schedule_span_proposal record.
Table 12. Returns
Type Description
String The user's name based on rosterSpanProposalGr.

OCRosterSpanApprovalUtil - isPTOApprovalRequired ()

Checks whether the system property com.snc.on_call_rotation.pto.approval.required is true.

Table 13. Parameters
Name Type Description
None
Table 14. Returns
Type Description
Boolean Returns true if the system property com.snc.on_call_rotation.pto.approval.required is true..

OCRosterSpanApprovalUtil - rejectPTOSpan (rosterSpanGr GlideRecord)

Changes the type of the roster_schedule_span to rejected from approval.

Table 15. Parameters
Name Type Description
rosterSpanGr GlideRecord A roster_schedule_span_proposal record.
Table 16. Returns
Type Description
void