1 - NetSuite Application Developer Cert

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/149

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

150 Terms

1
New cards

Client Script

Client scripts are scripts executed by predefined event triggers in the client browser.

Client Scripts execute on 'Edit' and run on individual forms, can be deployed globally, and are applied to entity and transaction record types.

They can validate user-entered data and auto-populate fields or sublists at various form events.

Entry points: Loading form, Edit/Changing, and on Save

2
New cards

User Event Script

User event scripts are executed on the NetSuite server. They are executed when users perform certain actions on records, such as create, load, update, copy, delete, or submit.

Most standard NetSuite records and custom record types support user event scripts

Entry points: afterSubmit, beforeLoad, beforeSubmit

3
New cards

Map Reduce Script

The map/reduce script type is designed for scripts that need to handle large amounts of data.

They provide a structured framework for processing a large number of records or a large amount of data and are best suited for situations where the data can be divided into small, independent parts.

Either Map or Reduce functions are required to execute. Both are not necessarily required.

Map Reduce Scripts are not best for long complex functions that need to be enacted.

Map Reduce Scripts permit yielding and leverage multiple jobs to execute.

4
New cards

Scheduled Script

Scheduled scripts are server scripts that are executed (processed) with SuiteCloud Processors. You can deploy scheduled scripts so they are submitted for processing at a future time, or at future times on a recurring basis.

Scheduled scripts are assigned one job and one processor for execution. It does not support yielding, unlike M/R.

Best not to be used with large amounts of data. Instead, use M/R script for large data.

5
New cards

Workflow Action Script

- One entry point, onAction(scriptContext)

- Useful because actions on sublist fields are not available through the workflow manager

- Execute complex logic beyond built-in action

6
New cards

Suitelet Scripts

Suitelets are extensions of the SuiteScript API that give developers the ability to build custom NetSuite pages and backend logic.

Suitelets are server-side scripts that operate in a request-response model. They are invoked by HTTP GET or POST requests to system generated URLs

7
New cards

Front End Suitelet

Use UI objects to create custom pages that look like NetSuite pages. SuiteScript UI objects encapsulate the elements for building NetSuite-looking portlets, forms, fields, sublists, tabs, lists, and columns

8
New cards

Backend Suitelet

Do not use any UI objects and execute backend logic, which can then be parsed by other parts of a custom application.

Backend Suitelets are best used for the following purposes:

- Providing a service for backend logic to other SuiteScripts.

- Offloading server logic from client scripts to a backend

Suitelet shipped without source code to protect sensitive intellectual property.

9
New cards

RESTlet

A RESTlet is a SuiteScript that you make available for other applications to call. It can be called from either an external application or from another script within NetSuite. A RESTlet executes only when it is called and in some cases, returns a value to the calling application.

RESTlets can be useful when you want to bring data into NetSuite from another system, or if you want to extract data from NetSuite. RESTlets can also be used in combination with other scripts to customize the behavior of a page within NetSuite

Entry Point: Get, Delete, Put, Post

10
New cards

Portlet Script

Portlet scripts are run on the server and are rendered in the NetSuite dashboard. The following portlet script types are supported

Simple form

Inline HTML

Simple List

Dashboard SuiteApp Portlet

Entry Point: render(params)

11
New cards

Mass Update

Mass update scripts allow you to programmatically perform custom updates to fields that are not available through general mass updates. Mass update scripts can run complex calculations, as defined in your script, across records.

Mass update scripts are started on demand, and you cannot prioritize them or schedule them to run at specific times. If you want your script to run at a specific time, consider using a scheduled script or map/reduce script instead of a mass update script

12
New cards

Bundle Installation

Bundle installation scripts are specialized server scripts that perform processes in target accounts as part of a bundle installation, update, or uninstallation. These processes include setup, configuration, and data management tasks that would otherwise have to be completed by account administrators.

Every bundle can include a bundle installation script that is automatically run when the bundle is installed, updated, or uninstalled. Each bundle installation script can contain triggers to be executed before install, after install, before update, after update, and after uninstallation.

13
New cards

Log Levels

Debug: For scripts in testing mode. Selecting this level will show all log messages (debug, audit, error, and emergency).

Audit: For scripts going into production. Selecting this level will show the events that have occurred during the processing of the script (for example, "A request was made to an external site.").

Error: For scripts going into production. Selecting this level will show only unexpected script errors.

Emergency: For scripts going into production. Selecting this level will show only the most critical errors in the script log.

14
New cards

SuiteScript 2.1 Server-side Debugger

- Only debugs 2.1 Scripts

- Uses Chrome Devs Tools

- Use Break Points to stop the execution of scripts

Types: Scheduled scripts, Suitelets, User event scripts

15
New cards

Client Script Debugger

Client scripts are executed on the client browser based on how they are deployed. To debug a client script, use the debugging tools available on your browser. SuiteScript supports several browsers:

Google Chrome (preferred)

Mozilla Firefox (preferred)

Microsoft Edge

Apple Safari

Form & Record level scripts should both be debugged

16
New cards

RESTlet Debugger

- Launch and debug via SuiteCloud IDE extension

- Debug a launched script, be sure to remove HTTP header

17
New cards

n/log

- Log Object is loaded by default for all script types

- Used for logging script execution details

- Log messages appear on the Execution Log tab of the script deployment.

- Governed by NetSuite

- Max logging given any 60-minute

- 100,000 log object method calls across all scripts

18
New cards

n/error

Use try-catch statements to abort script execution.

- Create Error

- Throw Error

- Handle Error

Log errors using N/log module

User Event unsupported

19
New cards

n/record

Use this module to:

- create

- delete

- copy

- load

- make changes to record

20
New cards

require Function

Used for On-demand Bugging

The require function is a global object that implements the require() Module Loader interface for SuiteScript 2. x. When NetSuite executes the required function, it executes the callback function and loads the dependencies when they are needed.

This function executes asynchronously on the client and synchronously on the server.

21
New cards

define Function

The first argument is a list of any dependencies, such as standard SuiteScript 2.x Modules. These modules are loaded when the script executes.

The second argument is a callback function. The callback function must include a return statement that identifies at least one standard or custom entry point. The entry point must be associated with an object that is returned when the entry point is invoked. In most use cases, this object is a function.

22
New cards

JSDoc Annotations

/**

* Creates a file

* @param {string} name - file name

* @param {string} fileType - file type

* @param {string} contents - file content

* @returns {Object} file.File

*/

JSDoc also includes its markup language, which is made up of JSDoc tags. These tags are prefaced with the @ symbol. The JSDoc tags are added to the comment blocks, and they are used to specify the various entities of a JavaScript file (for example, @param).

23
New cards

Document Object Model (DOM)

SuiteScript does not support DOM module. NetSuite UI access should be leverage using SuiteScript API

24
New cards

Asynchronous Module Definition (AMD)

Organize code and design patterns into modularized code

- Async Loading

- Dependency Management

- Dynamic Loading

- Browser Compatibility

25
New cards

Custom Modules

With SuiteScript 2. x, you can create custom modules (including third-party, AMD, and non-AMD modules). This supports modular and well-structured organization of code that is easier to read and modify. It also lets you build and access additional, customized API functionality.

- Custom API's

- Expose modules to 3rd parties

- Import third-party API

- Organize business logic, separate from utilities

26
New cards

SuiteScript Best Practices

Script Structure and Organization: Break code into smaller, manageable modules. Use meaningful names and organize scripts logically for easy maintenance.

Performance Optimization: Minimize script execution time by reducing unnecessary operations and optimizing loops and queries.

Error Handling: Implement robust error handling to catch and manage exceptions, ensuring scripts fail gracefully.

Governance and Resource Management: Be mindful of NetSuite governance limits. Efficiently use system resources and cache data when possible.

Security: Follow security best practices to prevent vulnerabilities, such as avoiding hardcoded credentials and validating user inputs.

Version Control: Use versioning for scripts to track changes and revert if needed, ensuring a reliable codebase.

Testing and Debugging: Thoroughly test scripts in a sandbox environment before deploying to production. Leverage debugging tools for efficient troubleshooting.

Documentation: Maintain comprehensive documentation for code, explaining functionality and usage for better collaboration and understanding.

27
New cards

Record-level deployment

- Applies script globally on one or more record types

- Runs on all forms associated with that record type

- Cannot limit the script to one form

- Can be used on forms/ lists generated by Suitelets

- Upload script file to file cabinet

- Must create Script Record and Script Deployment

28
New cards

Form-level deployment

- Attach the script to a custom form associated w/ record type

- Only runs when the custom form is used

- Cannot limit the audience for a form-level script

- Attach the script to the custom entry form

29
New cards

Script Parameters

- User changeable fields that affect the execution of the script

- Can pass values to other scripts

- On Script deployment record

30
New cards

N/ui Modules

- N/ui/serverWidget: contains UI components to work with

- N/ui/message: display and manage messages at the UI level

- N/ui/dialog: create modal dialog boxes for options/alerts

- message & dialog can execute on client scripts

31
New cards

N/currentRecord

- Use client scripts to interact w/ currently active record

- Always in Dynamic mode

- Does not permit the editing of subrecords, but can be retrieved

32
New cards

Online Forms

- HTML documents used for customer/ case forms/ marketing

- Uses and tags

- Uses tags

- Can tag NetSuite fields

- Can Pass parameters or track URLs from forms

33
New cards

Scriptable Templates

- use a combo of HTML and FreeMarker code

- Add dynamic variables to your HTML

34
New cards

N/url

- Determine URL navigation paths within NetSuite or format URL strings

- Retrieve the URL of a relative record

- Retrieve the domain for calling a RESTlet

35
New cards

N/redirect

- customize navigation by redirect URL internally or externally

- doesn't support beforeSubmit or asynch afterSubmit events

- redirect to Suitelet or a NetSuite record, or saved search

36
New cards

context.UserEventType

- considered an entry point

- holds the string values for user event execution context

- beforeLoad, beforeSubmit, and afterSubmit entry points

- consists of values such as CREATE, TRANSFORM, EMAIL

37
New cards

SuiteScript Browser

- records generally available for use in SuiteScript

- available fields, sublists and search filter fields for certain records

- Use Records Browser for the most recent release

38
New cards

N/record

- work with NetSuite records

- create, delete, copy, load or make edits to records

- default values

record.create - copy, transform, load

39
New cards

SuiteScript Member Types

- Object

- Method

- Enum

- Property

40
New cards

Subrecords

- always represented by a single field on a record

- can exist either as a body or sublist field

- dynamic/ standard mode

41
New cards

N/file

- use module to work with files within NetSuite

- upload files to the NetSuite file cabinet

- send files as attachments without uploading them to FC

- File.getReader() has a 10MB limit

42
New cards

N/search

- create and run on-demand saved searches results

- paginate search results, suitable for large results

- search for single record

- search for duplicate records

- return a subset of records that match filter criteria

43
New cards

N/query

- lets you create and run queries using Analytics API

- query using Records Catalog

- create conditions, formulas, joins, and page results

44
New cards

N/datasets

- create a new datatset, load an existing dataset

- list existing datasets, or saved datasets

- available for server script only

- analogous to executing a query definition using N/query

45
New cards

N/datasetLink

- link datasets

- when linked, you can use both datasets in your workbooks

46
New cards

N/workbook

- create a new workbook

- load an existing workbook

- list all existing workbooks

47
New cards

n/task

- create tasks and place them in the internal NS task queue

- submit the scheduled script

- run a m/r script

- Import CSV files

- merge duplicate records

- run async searches, queries, SuiteQL, and workflows

- server script only support

48
New cards

N/email

- use module to send email messages from within NetSuite

- regular, bulk and campaign emails

- promises works with n/email

- supports client and server

49
New cards

N/http

- use to make http calls from server or client scripts

- client scripts, use to make cross-domain http requests

- does not accept https protocol

- supports CRUD

50
New cards

N/https

- manage content set to 3rd party using https calls

- make https calls from client and server

- does not allow http protocol

- loads n/crypto and n/encode module

- Use TLS 1.2 for https requests

- Use TBA or OAuth 2.0 for credentials

51
New cards

N/sftp

- to manage folders and upload/ download files from external SSH file transfer servers (SFTP)

- NetSuite does not provide SFTP server functionality

- To/from transfer must originate from SuiteScript

- SSH Keys to establish an SFTP connection

- Server script support

52
New cards

N/runtime

- View runtime settings for a script, session, or user

- Use module to set a session key or to see if a feature is enabled

- Get script parameters = Script.getParameter(options)

- Check feature = runtime.isFeautreinEffect(options)

- Client and server support

53
New cards

N/config

- access NetSuite configuration settings

- config.load(options) = loads record object configuration

- server script support

54
New cards

N/currency

- to work with exchange rates within NS account

- find exchange rate between two currencies based on date

- currency format is handled by N/format

- client and server support

55
New cards

N/format

- parse formatted data into strings and convert strings into a specific format

- format data according to personal preferences page

- client and server support

56
New cards

N/recordContext

- get all available context types of a record

- create conditional statements within a script to change behavior based on the context set

- get Localization Value

- client and server support

57
New cards

N/translation

- interact with NS translation collections programmatically

- read-only access

- translate content to local language

- client and server support

58
New cards

Map/Reduce entry points

- getInputData (inputContext)* required

- map (mapContext) optional

- reduce (reduceContext) optional

- summarize (summaryContext)* required

59
New cards

getInputData

- purpose is to generate input data

- reference object that represents data, i.e. record or search

- can use JSON.stringify()

60
New cards

map(mapContext)

- the logic of your map function applied to each key/pair value

- One key/value pair is processed per function invoke

- Pass to the reduce stage

61
New cards

reduce(reduceContext)

- reduce logic applied to each key and list value

- shuffle stage, when using map, sorts data from map by key

- logic lets you save data to pass to summarize stage

62
New cards

summarize(Context)

- holds statistics regarding the execution of script

- logic is applied to the result set

- display results in concurrency, seconds, usage, yields etc.

63
New cards

Workflow States

- represents a specific step or phase within a workflow

- each state can have conditions and actions

- conditions that must be met

- actions to be performed, such as sending emails or adding buttons

64
New cards

Workflow Actions

- specific tasks performed by the workflow instance based on the properties of the record

- use actions to manipulate fields on a record or create new records

- trigger determines when an action executes

- can execute based on a condition

65
New cards

Client Action Triggers

Before User Edit

Before Field Edit

After Field Edit

After Field Sourcing

Before User Submit

66
New cards

Server Action Triggers

On Entry

On Exit

Before Load

Before Submit

After Submit

Scheduled

67
New cards

Custom Workflow Action

Functionality of a custom action is defined with SuiteScript in a workflow action script

68
New cards

Workflow State Fields

- apply to a single state in a workflow

- get and set data within a workflow, similar to workflow field

- store unique value for each record per instance the workflow runs on

69
New cards

Workflow Conditions

used on workflow

- initiation

- actions

- transitions

Can be basic field value, comparisons, exp, or formulas

70
New cards

Workflow Transitions

- moves the record in the workflow into another state

- a state can contain multiple transitions, w/ multiple conditions

- triggers determine when a transition executes

71
New cards

Transition Trigger Types

- Entry

- Before Record Load

- Before Record Submit

- After Record Submit

- Scheduled

- Blank

*Exit doesn't appear to be supported

72
New cards

Workflow Formulas

- can defined in conditions for:

workflow initiation, actions, and transitions.

- build formulas based on the fields for the workflow base record and joined records

- calculated dynamically when the workflow instance runs

- SQL functions when executes on a server trigger

- JS/ SuiteScript API when action executes on client trigger

73
New cards

Workflow Saved Searches

- use saved search on an action as a condition

- doesn't execute unless the record is returned by search

- when triggered, NS runes the saved search immediately

- use server trigger w/ action and saved search condition

- doesn't respect client trigger

74
New cards

Scheduled Workflow Actions

- scheduled actions only execute after the record enters the state for the action

75
New cards

Lock Record Action

- action to lock record for workflow instance when the record is in state

- does not have any additional parameters

- the default trigger type is Before Record Load

76
New cards

Add Button Trigger

Supports the following server-side trigger

- Before Record Load (default)

- On Entry

- On Exit

77
New cards

Do Not Exit Workflow

- non-exiting states to execute a workflow indefinitely

- use for single state workflows

- good for approval based workflows

78
New cards

Execution Context Filtering

- use to ensure that your scripts or workflows are triggered

- context types that define if workflow is executed because of an action, RESTlet, or integration

79
New cards

Workflow Event Types

- define workflows to initiate or execute actions and transitions on specific event types

- such as create, edit, email etc.

80
New cards

Sublist Action Groups

- execute actions on sublist lines for transaction records

- can be executed on all server triggers

- they cannot be executed on client triggers

81
New cards

Sub-Workflows

- use when you have multiple workflows you want to process

- sequential processing

- parallel processing

- parallel approvals

- separate client and server trigger action executions

- can be async or synchronous

82
New cards

Old Values in Workflow

- can change values of a record when the workflow runs

- reference pre-edit values on Before/After Record Submit

- values that existed in the DB before saving the changed record

83
New cards

Set Field Value Action

- set the value of a record field in a workflow instance

- action to set any field value on a record form including multi and date fields

- field, static value, date, from field, formula

- before Record Load server trigger doesn't apply, use Client to override existing values on record

84
New cards

Workflow Execution Log

- tracks all actions and transitions that execute on record

- use to debug and troubleshoot

- when in testing mode, it's enabled by default

- when in release mode, it must be enabled manually

- keep logs can potentially slow down record performance

- Deleted every 60 days

85
New cards

Advanced PDF/HTML Templates

- More advanced editing than basic form layouts

- used to format email and printed versions of transactions

- can produce either PDF or html output

- can use SuiteScript to make advanced customizations

86
New cards

BFO

- Big Faceless Organization

- Java application that converts XML to PDF

- uses and commonly

87
New cards

FreeMarker

- Java-based library used to generate text outputs based on templates and dynamic data

- Uses interpolations to include NetSuite data in templates

- expression such as, ${record.entity}

- reference fields, sublists, and other lists

- Scalars: field values from Netsuite records

- Hashes: variables that act as directories. Records and sublists

- Sequences: containers that store a list of variables. Retrieve Sublist values

88
New cards

N/render

Module for:

- printing

- PDF Creation

- form creation from templates

- email creation from templates

- server script support only

89
New cards

FreeMarker w/ BodyFields

Syntax = ${object.fieldId}

Example = ${record.entity}

Record = object

Entity = fieldId

90
New cards

FreeMarker w/ Sublists

uses the #list declaration

<#list record.item as item>

${item_index} ${item.itemName@label} ${‌item.itemName} --- ${‌item.amount}

Sublist Syntax

${item.item@label}

${‌item.id}

${‌item.item}

${‌item.quantity}

91
New cards

FreeMarker w/ Joins

Syntax = ${record.related_record.fieldId}

Example = ${record.item.salesdescription}

<#list results as salesOrder>

${salesOrder.customer.phone}

92
New cards

FreeMarker w/ Formatting

Standard Field Formatting:

ex: ${record.custbody_show_int} = 1,234 Output

Use ${nsform*()} method for custom vairables

ex: ${nsformat_url ("http://example.com")} = clickable link

93
New cards

Custom DataSource for Templates

Use the N/render module and combine data from an outside source

- JSON/XML is handled as a string

-

- JSON is converted to XML for printing

94
New cards

FreeMarker Locale

- Printouts are localized based upon user/ customer setting

- Alter content across forms

<#if .locale == "en_US">

<#elseif .locale == "es_FR">

95
New cards

Execution Context

- Tell the system how or when an SS or SF is triggered to run

- Set on Context Filter tab or Programmatically on Script

- Will not execute if the context is not set

- can use runtime.ContextType in the script to execute context

96
New cards

N/ui/message

- display non-intrusive message or alerts to users

- doesn't necessarily require user input or interaction

97
New cards

N/ui/dialog

- present a modal or pop-up window that requires user interaction or input before proceeding

- contains forms, prompts, or critical messages

98
New cards

N/util

- Util Object loaded by default for all script types

- use to access methods that verify object and primitive types manually

- possibly used for logging/ debug

- iterates over each member in Objects/ Arrays

- copies source object to destination objects

- Otherwise, use a boolean to return t/f about JS functions

99
New cards

SuiteBuilder Source List

- select the record type you want to source from

- can select multiple source lists for your custom records

100
New cards

SuiteBuilder Source From

- select the field you want to include information from

- must select a Source List first

- field type must match the type selected in Type field