Scripting Module 6 Flashcards
What are examples of user methods in the GlideSystem?
getUser()
getUserDisplayName()
getUserID()
getUserName()
hasRole()
hasRoleInGroup()
What are examples of system methods in the GlideSystem?
getProperty()
getPreference()
getDisplayColumn()
tableExists()
nil()
eventQueue()
print()
log()
logError()
getMessage()
What are examples of date and time methods in the GlideSystem?
beginningOfLastWeek()
beginningOfNextMonth()
dateDiff()
endOfLastWeek()
endOfNextMonth()
minutesAgo()/daysAgo()/quartersAgo()/monthsAgo()/yearsAgo()
now()
nowDateTime()
What are good practices when using the GlideSystem?
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