Scripting Module 5 Flashcards

1
Q

What is a business rule?

A

JavaScritpt that runs when a record is displayed, inserted, updated, or deleted or a table is queried

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

When does a before query business rule run?

A

Executes before a query is sent to database

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

When does a display business rule run?

A

Executes after the data is read from the database and before the form is presented to the user

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

What is the primary purpose of display business rule?

A

Populate g_scratchpad global object

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

When does a Before business rule run?

A

Executes after form submission and before record is updated in database

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

When does an After business rule run?

A

Executes after form submission and record update in the database

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

When does an Async business rule run?

A

Queued by the scheduler to run as soon as they can be fit in.

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

What predefined server side global variables are available in a business rule?

A

Current - object that stores the current record’s fields
Previous - object that stores the records fields values before any changes were made
g_scratchpad - display rules only

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

What are the informational icons in the script tree?

A

Table - indicates the field references another table
Blue circle - field resides on the current table
Red square - field resides on a parent table
Index field icon - field is part of one or more indexes

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

What are the Glide System Logging Methods?

A

Sent to the system log
gs.info()
gs.log() - global scope only
gs.error()
gs.warn()
gs.debug()

Sent to top of form
gs.addInfoMessage()
gs.addErrorMessage()

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

How do you debug Business rules?

A

GlideSystem logging methods
Debug Business Rules
Script Debugger
Script Tracer
Console Debugger
Try/catch

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

What does the Script Debugger offer?

A

The ability to step through your script line by line
Set and remove breakpoints
Pause at a breakpoint
Step into and out of function and method calls
View the value of local and global variables
View the value of private variables
View the call stack
View the transaction the system is processing

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

What are the script debugger controls?

A

Start Debugging
Pause Debugging
Resume Script Execution
Step Over next function
Step into next function
Step out of current function

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

What does the script tracer do?

A

Helps you filter your debugging search to quickly narrow down script problems.

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

What are good practices for business rules

A

Use Async Business rules whenever possible
Use Display Business Rules to pass data from server-side to client-side during form load (g_scratchpad)
Write condition statements in the condition field
Add the description field to the Business Rule for to document what the rule does
Choose an appropriate debugging strategy
Comment your scripts

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