Font size
WorksheetsServiceNow Coding Best Practices
Total questions: 20
Worksheet time: 14mins
What field filter should always come first when filtering log tables?
Created
(sys_created_on)
Message
(message)
Source
(source)
Level
(level)
Which condition is more appropriate for a UI action:
gs.isMemberOf('admins');
gs.hasRole('admin');
Rate this code snippet:
1
2
3
Name this glide record:
gr
inc_gr
gr_inc
highIncs
New (custom) fields on an OOB table should be named
With prefix:
u_
Org prefix:
(e.g. sfg_)
no prefix, intuitive name
With prefix:
x_
Rate this business rule code snippet:
1
2
3
How can we ensure to ONLY update records using a transform map without inserting new records.
Pick the best example of naming variables
What's the most efficient way to update a list of records?
GlideRecord.update() in a while loop
GlideRecord.updateMultiple() after query()
GlideRecord.updateMultiple() without query()
Select the best code snippet provided:
Rate this code snippet:
1
2
3
Select the most appropriate code snippet for input validation:
1
2
3
Rate this code snippet:
1
2
3
Rate this code snippet:
1
2
3
Pick the best update set name
OPS_JC_STRY0001_Incident form updates_v2
STRY0001 - Incident form updates - v2
OPS-STRY0001-v2-Incident form updates
OPS-JC-STRY0001 - Incident form updates - v2
Existing Customer Standard
Which name is an example of camel case?
myVariableName
my-variable-name
my_variable_name
Which name is an example of snake case
myVariableName
my-variable-name
my_variable_name
When making a small customization to an OOB script...
Write comments before and after the customization which reference the story/ticket
Edit the code in place directly
Comment the original line and write new line
When making a large customization or many customizations to an OOB script...
Deactivate the OOB script and create a new record
Comment out the OOB lines and rewrite
Write comments before and after each customization with reference to the relevant stories/tickets
Select the most appropriate code snippet for updating a field value on a form
