Scripting Module 6 Flashcards

1
Q

What are examples of user methods in the GlideSystem?

A

getUser()
getUserDisplayName()
getUserID()
getUserName()
hasRole()
hasRoleInGroup()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are examples of system methods in the GlideSystem?

A

getProperty()
getPreference()
getDisplayColumn()
tableExists()
nil()
eventQueue()
print()
log()
logError()
getMessage()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are examples of date and time methods in the GlideSystem?

A

beginningOfLastWeek()
beginningOfNextMonth()
dateDiff()
endOfLastWeek()
endOfNextMonth()
minutesAgo()/daysAgo()/quartersAgo()/monthsAgo()/yearsAgo()
now()
nowDateTime()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are good practices when using the GlideSystem?

A

Use the appropriate object methods based on your scope (GlideSystem Scoped GlideSystem)
Write validation scripts for forms with dates
Whenever possible, use the GlideDateTime methods rather than Javascript date methods
Always check the ServiceNow Developers portal for the latest information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly