Performance and Security Flashcards

1
Q

What should we do with mission critical User Event scripts if we want to account for any errors or misfires?

A

Create a “clean up” scheduled script to make sure user events performed as they should have.

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

True or False?

User Event scripts can trigger other user event scripts.

A

False

UE scripts cannot trigger other UE scripts

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

What should we do with common code that is used across multiple User Event scripts?

A

Create a custom module, or a “library”, that contains that common code.

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

True or False?

It is should NOT read sensitive field values from a User Event script

A

True.

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

As a best practice, how can we limit the scope of a User Event from within the script itself?

A

We can use the context object, and context.UserEventType enum to define a limit the scope of a UE script

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

When should we use the afterSubmit entry point in a User Event script?

A

When using an operation that depends on the submitted record already being committed to the database

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

When updating transaction line items in a beforeSubmit script we must ensure that the line item totals, net taxes and discounts are equal to what 4 fields?

A

summarytotal
discounttotal
shippingtotal
taxtotal

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

Why is creating many UE scripts for a single record discouraged?

A

It greatly increases load times and hinders user experience

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

To set a field on a record or make any changes to a record being submitted, which entry point should we use?

A

beforeSubmit

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

Any post-processing operations of a current record should be done in what user event?

A

afterSubmit

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

If you want to store a value during a beforeLoad operation and then read that value during an afterSubmit operation in the same script, as a best practice, what should you do?

A

Create a hidden custom field on the form to store the value. Value stored in beforeLoad in this field and then the value is retrieved from this field in afterSubmit

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

What does the execution context setting on a User Event specify?

A

How and when a UE is triggered. (e.g., Only trigger from UI, Only trigger from Suitelet, etc…)

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

Limit the amount of script execution in UE scripts. Time taken to execute should be less than..?

A

5 seconds

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

What should we use to test performance of user event scripts deployed to a specific record type?

A

The Script Performance Monitor SuiteApp

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

What should we use for debugging a User Event?

A

The debugger; statements on the browser console

This statement can also be used in the SuiteScript Debugger to help debug server scripts

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

True or False?

Activities on a hosted website can trigger server-side scripts

A

True

Scripts on Sales Order, Case, and Customer records also execute in response to web activities.

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

True or False?

We should use inline editable child custom records when processing child records during UE on a parent record

A

True

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

What 4 things can we do to optimise search filters?

A

◦ Filter inactive records
◦ Shorter date range
◦ Faster operators (e.g. starts with, between, and within are faster than contains or formulas)
◦ Remove unnecessary columns

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

Why should we try to combine searches of the same record type by using merged filters where possible?

A

This improves performance by reducing search instances

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

How many results does N/search return?

A

N/search returns the first 1000 results

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

If we want N/search to return more results, what can we do, and what is the limit?

A

Can return a resultSet, but the limit is 4000 results

Alternatively, can use pagination for N/search to return more than 1000 results

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

When returning a large dataset with N/search:

If a record that originally fit the search criteria is updated and no longer fits the criteria, what happens?

A

It is skipped by the search.

In this case, some records that were originally included in the search results may not be returned, and the total number of returned records may be smaller than the original total number of results.

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

When returning a large dataset with N/search:

If new records are created that fit the search criteria, what happens?

A

They are also returned.

The total number of returned records may be higher after you page through the results than the original total number of results, and duplicate results may be returned.

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

When returning a large dataset with N/search:

If a record from the first results page is updated and it no longer fits the criteria when going through subsequent pages of search results, what could be a concern?

A

Results may be missing.

For example, if a record from the first results page is updated and it no longer fits the criteria, another record now fits into page one. However, because earlier pages are skipped when going through subsequent pages of search results, this record is not returned.

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

True or False?

When returning a large dataset with N/search:

Page two and the subsequent pages of the results set may contain fewer records than the specified page size.

A

True

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

If new records of the same type, matching the search criteria, are created between a search request and a searchMoreWithId request, what problem could occur?

A

It can cause position changes in the results and can move records on or even out of search pages. This causes missing or duplicate records on pages.

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

To avoid issues when returning a large dataset with N/search:

How should we define our search criteria, to avoid using a loosely defined search that returns a large data set, and why?

A

Make your search criteria as specific as possible.

With more specific criteria, the result set is smaller and there is less chance that records fitting the search criteria are created or updated as you go through the pages of the result set.

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

To avoid issues when returning a large dataset with N/search:

To ensure new or updated records will not fit the search criteria or to ensure that no new records are added or updated during your search, what would be the best solution?

A

Using a within lastModifedDate filter is the best solution

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

In SuiteScript 2.0, as an alternative to using the N/search module for large data sets, what module can we use instead, and which object members of that module?

A

N/task

searchTask object
searchTaskStatus object

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

To avoid issues when returning a large dataset with N/search:

If your search contains a search join, you can lower the occurrence of issues with duplicate results how?

A

By setting two Sort By columns.

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

True or False?

N/query can use multilevel joins.

A

True

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

N/query can convert query objects into what other type of query?

A

SuiteQL queries

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

What is SuiteQL?

A

SuiteQL is a query language based on the SQL-92 revision of the SQL database query language

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

True or False?

N/query can load, delete and save existing queries.

A

False

N/query can load and delete existing queries, but it can NOT save queries

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

True or False?

N/query uses a different data source than the N/search module

A

True

Record type ID or field ID (e.g. Actual Shipping Date field ID in N/search is actualshipdate, but in N/query it is actualShipDate)

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

What format are the results from N/query returned in, and what is the limit?

A

They are returned as a result set, with a maximum of 5000 results

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

How can we increase the maximum number of returned results from the N/query module?

A

Run them as paged.

38
Q

True or False?

N/query can be used to delete a dataset.

A

True

39
Q

True or False?

N/datasets can be used for all script types.

A

False.

N/datasets can ONLY be used for server side scripts

40
Q

How do datasets create a query, and what can the results of those queries be used for?

A

Datasets combine record type fields and criteria filters to create a query, the results of this query can be used as the source data for workbooks you create

41
Q

True or False?

A single dataset can ONLY be used in one workbook.

A

False

A single dataset can be used in multiple workbooks

42
Q

True or False?

Dataset.run returns a query result set (same as N/query module)

A

True

43
Q

N/query uses which query language?

A

SuiteQL

44
Q

What data source does SuiteQL use, and why is this potentially an advantage over Saved Searches or Reports?

A

Uses the analytics data source which exposes it to data that is not available to Saved Searches or reports

45
Q

How does the SuiteQL technology improve security?

A

Role-based restrictions still apply, and it does not allow unsupported SQL functions, helping to prevent SQL injection attacks.

46
Q

What is a syntactic limitation to the SuiteQL platform?

A

SQL-92 or Oracle SQL syntaxes CAN be used, but only one may be used per query.

47
Q

When using SuiteQL, the character cases of record type and field names may not always be consistent and can change. These name changes may occur after a NetSuite release or scheduled e-fix.

How can we address this?

A

Convert these names to upper or lower case to ensure consistency

48
Q

True or False?

N/cache can be used in ALL script types.

A

False.

N/cache can only be used in server side scripts

49
Q

What does the N/cache module enable us to do?

A

Used to enable temporary, short-term storage of data

50
Q

Using N/cache, you can create cache with varying availability.

What are the 3 availability scopes?

A

◦ PRIVATE: Only available to current script
◦ PROTECTED: Available to all server scripts in the current bundle
◦ PUBLIC: Available to all server scripts in the account

51
Q

N/task can be used to perform 5 significant functions, what are those 5?

A

◦ Submit a scheduled script
◦ Submit a Map/Reduce script
◦ Import CSV files
◦ Merge duplicate records
◦ Execute asynchronous searches, constructed queries, SuiteQL queries, and workflows

52
Q

True or False?

Tasks are always triggered asynchronously

A

True, same as any other programming language

53
Q

Which of the following can execute a query that was created using the N/query module?

a) Task.QueryTask
b) Task.SearchTask
c) Task.SuiteQLTask
d) All of the above

A

Answer: A & B

54
Q

Which of the following can set a file ID or file path of a CSV file in the File Cabinet? The results of which will be added to that CSV file.

a) Task.QueryTask
b) Task.SearchTask
c) Task.SuiteQLTask
d) All of the above

A

Answer: D

The results of the query will be added to the CSV file

55
Q

When using A task to add the results of a query to a CSV file in the File Cabinet, we have to specify a filePath or FileID, what must we take into consideration here?

A

We can only specify a filePath OR a fileID, if both are set, an error occurs

56
Q

What does the N/task Task.SearchTask object allow?

A

Submits a search task into the task queue, execute it asynchronously, and persist the results.

57
Q

Which of the following can we add dependent tasks onto, allowing further processing to occur automatically AFTER the original task is complete?

a) Task.QueryTask
b) Task.SearchTask
c) Task.SuiteQLTask
d) All of the above

A

Answer: D

58
Q

What are dependent tasks processed using?

A

SuiteCloud Processors

59
Q

How many tasks can be added per call to the «TaskType».addInboundDependency function call?

TaskTypes:
QueryTask.addInboundDependency
SearchTask.addInboundDependency
SuiteQLTask.addInboundDependency

A

Only 1

60
Q

Dependent tasks can only be run as what script types?

A

Dependent tasks can only be one of task.MapReduceScriptTask or task.ScheduledScriptTask, other script types are not supported.

61
Q

Which of the following object members are capable of being utilised to get the status of their corresponding task?

a) Task.QueryTask
b) Task.SearchTask
c) Task.SuiteQLTask
d) All of the above

A

Answer: D

62
Q

There is a limit to the number of async searches running at any one time. It matches the limit for CSV imports.

What is this limit?

A

The limit is 5 searches running at the same time.

63
Q

True or False

When creating a Task.SuiteQLTask, we must specify what SuiteQL query to execute and then define the params to that same SuiteQL query.

A

True, in much the same way as you would when creating a SuiteQL Query in any other way.

64
Q

What are SuiteCloud Processors?

A

SuiteCloud Processors is the current system used to process scheduled scripts and map/reduce scripts.

65
Q

What is a “job” in terms of SuiteCloud Processors?

A

A job is a piece of work submitted to the processors for processing. Each job is executed by a single processor

66
Q

How many SuiteCloud Processors jobs handle each instance of a scheduled script?

A

Each Scheduled script instance is handled by 1 job

67
Q

How many SuiteCloud Processors jobs handle each instance of a Map/Reduce Script?

A

Multiple jobs, the number can vary based on the concurrency limit field in the script deployment.

68
Q

How many SuiteCloud Processor jobs are assigned for each Map/Reduce function?

A

◦ 1 job for getInput stage
◦ 1 job for shuffle stage
◦ 1 job for summarise stage
◦ A minimum of 1 job for map stage
◦ A minimum of 1 job for reduce stage

69
Q

How can you specify how many SuiteCloud Processors jobs can be assigned to the Map and Reduce stages of a Map/Reduce?

A

Using the Concurrency Limit field in the script deployment.

70
Q

If the Concurrency Limit field in the script deployment of a Map/Reduce script is left empty, how many jobs will be assigned to the Map and Reduce stages of the script?

A

The number of jobs created will be equal to the total number of processors available in the account

71
Q

Dependent tasks are processed using SuiteCloud Processors, why is this?

A

Because dependent tasks are only capable of being scheduled scripts, or map/reduces

72
Q

The number of SuiteCloud processors available in the account depend on the number of SuiteCloud Plus Licenses purchased.

How many SuiteCloud processors are added to the account with EACH SuiteCloud Plus License beyond the first?

A

5 per license

73
Q

The number of SuiteCloud processors available in the account depend on the number of SuiteCloud Plus Licenses purchased.

How many does an account with no licenses have?

A

Only 2

74
Q

The number of SuiteCloud processors available in the account depend on the number of SuiteCloud Plus Licenses purchased.

How many processors would an account with just 1 license have?

A

Only 5

75
Q

True or False?

The more SuiteCloud Plus Licenses you have for your account, the larger the number of queues available for CSV imports.

A

False.

The number of SuiteCloud licences does not affect the number of queues available for CSV imports

76
Q

Regarding Integration Concurrency for RESTlets:

What is the integration concurrency limit for accounts without a license?

A

The integration concurrency limit for accounts without a license is 5

77
Q

Regarding Integration Concurrency for RESTlets:

The integration concurrency limit depends on the number of SuiteCloud Plus Licenses purchased.

How much does the concurrency limit increase per SuiteCloud Plus License?

A

Each SuiteCloud Plus License increase the integration concurrency limit by 10

78
Q

Regarding Integration Concurrency for RESTlets:

The service tier of your account increases the base concurrency limit.

What is the maximum number of SuiteCloud Plus Licenses for a standard account, and what is the base concurrency limit?

A
  • Max Licenses: 1
  • Base Concurrency Limit: 5
79
Q

Regarding Integration Concurrency for RESTlets:

The service tier of your account increases the base concurrency limit.

What is the maximum number of SuiteCloud Plus Licenses for a premium account, and what is the base concurrency limit?

A
  • Max Licenses: 3
  • Base Concurrency Limit: 15
80
Q

Regarding Integration Concurrency for RESTlets:

The service tier of your account increases the base concurrency limit.

What is the maximum number of SuiteCloud Plus Licenses for a enterprise account, and what is the base concurrency limit?

A
  • Max Licenses: 6
  • Base Concurrency Limit: 20
81
Q

Regarding Integration Concurrency for RESTlets:

The service tier of your account increases the base concurrency limit.

What is the maximum number of SuiteCloud Plus Licenses for a ultimate account, and what is the base concurrency limit?

A
  • Max Licenses: 12
  • Base Concurrency Limit: 20
82
Q

Regarding Integration Concurrency for RESTlets:

What setting sets the maximum number of concurrent requests for integrations?

A

The Integration Concurrency Limit

83
Q

Regarding Integration Concurrency for RESTlets:

A concurrency limit can be allocated to individual integration records.

However, there is a minimum unallocated concurrency limit value (a minimum amount of concurrency that is not allocated to any one integration) which is reserved for integrations that do not use an integration record or for creating a new integration.

What is the minimum unallocated concurrency limit value?

A

The minimum unallocated concurrency limit is 1, so if your concurrency limit is 5, you can only allocate a concurrency limit of 4 to your integrations.

Leaving 1 free for integrations without an integration record, or for creating a new integration.

84
Q

What setting determines if a Suitelet can be navigated to by both external and internal users?

A

The “Available Without Login” checkbox setting.

85
Q

If the available without login checkbox is checked, child client scripts cannot use what two modules?

A

N/query & N/search

86
Q

However, to allow external users access, what other setting than the Available Without Login checkbox must be enabled?

This setting must be enabled regardless once the Suitelet is set to released in order for the Suitelet to work.

A

The “All Roles” checkbox.

87
Q

There are 2 security measures that are self explanatory, and should absolutely be upheld at all times.

The flip side of this card will list them.

A

Do not hard code any passwords.

Always encrypt user credentials, use Token Based Authentication or OAuth2.0 when possible

88
Q

There are 4 field ID’s that cannot be read in beforeSubmit for any external role users. (e.g., Shoppers, Online form users, anonymous users, customer centre users, etc.)

What are they, and why?

A

◦ password
◦ password2
◦ ccunumber
◦ ccsecuritycode

Because these fields obviously contain sensitive information (passwords and credit card numbers)

89
Q

Why do we need to take caution when using the N/auth module to change user credentials?

A

Because it allows you to include a plaintext string for the password

90
Q

When using the N/query module to retrieve credit card information, what version of the credit card number can be retrieved, and ONLY that version?

A

Only the encrypted version of the credit card number can be retrieved.