SuiteScript 2.1 Flashcards
What can only be used to debug SuiteScript 2.1 Scripts?
SuiteScript 2.1 Debugger Tool
The SuiteScript 2.1 debugger tool can only debug scripts that have been what?
Scripts that have been deployed, and scripts that have no script record.
How many scripts can be debugged at a time using the SuiteScript 2.1 debugger tool?
Only 1, regardless of version.
What script status is required for the SuiteScript 2.1 debugger tool to function?
The script must be in the testing status.
What types of scripts is the SuiteScript 2.1 debugging tool able to debug? (4 total)
Scheduled Scripts
Suitelets
RESTlets
User Events
Can the SuiteScript 2.1 debugging tool be used to debug client side scripts?
No
How would one debug client side scripts?
Using debugging tools available in the browser, such as the console.
The script must include the “debugger” statement.
What form of debugging can only be used for SuiteScript 2.0 and 1.0 scripts with no script deployment or record?
Ad-hoc, on demand debugging found at Customization > Scripting > Script Debugger
How will ad-hoc debugging affect the environment being used for testing?
The scripts being tested will affect the environment being tested in. Therefore it is best not to do this in production accounts.
What must the “Define” method be changed to when ad-hoc debugging?
Define must be changed to “Require”
When debugging deployed scripts in SuiteScript 2.0 or 1.0 what 2 fields must be set to what values on the script and deployment record respectively?
The owner field on the script record must be set to the current account.
The status field on the deployment record must be set to “Testing”
When debugging RESTlets, why is it important to remove the HTTP authorisation header?
Because this can cause issues preventing the debugger from working.
How would you get the cookies pertaining to your RESTlet during debugging?
After selecting the RESTlet script in the debugger, the RESTlet’s cookies will be displayed.
What should you do with the RESTlet cookies once acquired?
They must be set in your client application and then the request must be sent.
What is the usage limit on all script types when debugging?
1000
Can you receive errors via email when debugging?
No, the email error notifications are disabled when debugging.
Where are execution log details displayed for SuiteScript 2.0 and 1.0 scripts when debugging?
They are displayed in the execution log tab.
Where are execution log details displayed for SuiteScript 2.1 scripts when debugging?
They are displayed in the console tab of the Chrome DevTools debugging window.
What script module can be used to aid in debugging?
the N/log module.
What is the N/log module used for?
It is used to log script execution details.
How many logs is an account allowed to make across all scripts?
100,000
How many days are logs permitted to exist before being purged?
30 days
If N/log is used on a client script deployed to a form, where will those logs be available for viewing?
They will appear on the relevant deployment record.
What is the purpose of the N/error module?
It is used to create custom SuiteScript errors.
Are errors created via the N/error module automatically logged?
No, the module is only used to create custom errors, not display them.
How would you display information related to custom errors created using the N/error module?
Using script logic, such as the N/log module.
What script types can the N/error module be used in?
Server side scripts only, excluding User Events.
The N/error module can be used in User Event Scripts, but what is the issue of it’s use?
The N/error module can create custom errors in User Event scripts, however the error object itself cannot be used. Making it redundant.