nsmockup
Version:
Test your Suitescripts before deploying to NetSuite
1,323 lines (1,219 loc) • 172 kB
JavaScript
'use strict';
/**
* @projectDescription SuiteScript JavaScript library summary.
*
* Note that there are some restrictions on API usage. Also note that the only 2 objects that can be
* contructed are nlobjSearchFilter and nlobjSearchColumn. All other objects can only be created via
* top-level exports.or method calls.
*
* The @governance tag refers to the usage governance for an API call
* The @restricted tag refers to any known restrictions with a particular API call
*
* All Object arguments are Javascript Objects used as hash tables for specifying key-value pairs
*
* @since 2005.0 Support scripting of current record in Client SuiteScript
* @version 2007.0 Support scripting of records in user events, portlets, and scheduled scripts
* @version 2008.1 Support scripting of web requests (Suitelets) and user interfaces (UI Object API)
* @version 2009.1 Support scripting of file objects
* @version 2009.2 Support scripting of setup records and assistant (multi-step) pages
* @version 2009.2 converted JS template to use eclipse code completion friendly format
* @version 2010.1 Suppport dynamic scripting
*/
/**
* Return a new record using values from an existing record.
* @governance 10 units for transactions, 2 for custom records, 4 for all other records
*
* @param {string} type The record type name.
* @param {int} id The internal ID for the record.
* @param {Object} initializeValues Contains an array of name/value pairs of defaults to be used during record initialization.
* @return {nlobjRecord} Returns an nlobjRecord object of a copied record.
*
* @since 2007.0
*/
exports.nlapiCopyRecord = (type, id, initializeValues) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Load an existing record from the system.
* @governance 10 units for transactions, 2 for custom records, 4 for all other records
*
* @param {string} type The record type name.
* @param {int} id The internal ID for the record.
* @param {Object} initializeValues Contains an array of name/value pairs of defaults to be used during record initialization.
* @return {nlobjRecord} Returns an nlobjRecord object of an existing NetSuite record.
*
* @exception {SSS_INVALID_RECORD_TYPE}
* @exception {SSS_TYPE_ARG_REQD}
* @exception {SSS_INVALID_INTERNAL_ID}
* @exception {SSS_ID_ARG_REQD}
*
* @since 2007.0
*/
exports.nlapiLoadRecord = (type, id, initializeValues) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Instantiate a new nlobjRecord object containing all the default field data for that record type.
* @governance 10 units for transactions, 2 for custom records, 4 for all other records
*
* @param {string} type record type ID.
* @param {Object} initializeValues Contains an array of name/value pairs of defaults to be used during record initialization.
* @return {nlobjRecord} Returns an nlobjRecord object of a new record from the system.
*
* @exception {SSS_INVALID_RECORD_TYPE}
* @exception {SSS_TYPE_ARG_REQD}
*
* @since 2007.0
*/
exports.nlapiCreateRecord = (type, initializeValues) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Submit a record to the system for creation or update.
* @governance 20 units for transactions, 4 for custom records, 8 for all other records
*
* @param {nlobjRecord} record nlobjRecord object containing the data record.
* @param {boolean} [doSourcing] If not set, this argument defaults to false.
* @param {boolean} [ignoreMandatoryFields] Disables mandatory field validation for this submit operation.
* @return {string} internal ID for committed record.
*
* @exception {SSS_INVALID_RECORD_OBJ}
* @exception {SSS_RECORD_OBJ_REQD}
* @exception {SSS_INVALID_SOURCE_ARG}
*
* @since 2007.0
*/
exports.nlapiSubmitRecord = (record, doSourcing, ignoreMandatoryFields) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Delete a record from the system.
* @governance 20 units for transactions, 4 for custom records, 8 for all other records
*
* @param {string} type The record type name.
* @param {int} id The internal ID for the record.
* @return {void}
*
* @exception {SSS_INVALID_RECORD_TYPE}
* @exception {SSS_TYPE_ARG_REQD}
* @exception {SSS_INVALID_INTERNAL_ID}
* @exception {SSS_ID_ARG_REQD}
*
* @since 2007.0
*/
exports.nlapiDeleteRecord = (type, id) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Perform a record search using an existing search or filters and columns.
* @governance 10 units
* @restriction returns the first 1000 rows in the search
*
* @param {string} type record type ID.
* @param {int, string} [id] The internal ID or script ID for the saved search to use for search.
* @param {nlobjSearchFilter, nlobjSearchFilter[]} [filters] [optional] A single nlobjSearchFilter object - or - an array of nlobjSearchFilter objects.
* @param {nlobjSearchColumn, nlobjSearchColumn[]} [columns] [optional] A single nlobjSearchColumn object - or - an array of nlobjSearchColumn objects.
* @return {nlobjSearchResult[]} Returns an array of nlobjSearchResult objects corresponding to the searched records.
*
* @exception {SSS_INVALID_RECORD_TYPE}
* @exception {SSS_TYPE_ARG_REQD}
* @exception {SSS_INVALID_SRCH_ID}
* @exception {SSS_INVALID_SRCH_FILTER}
* @exception {SSS_INVALID_SRCH_FILTER_JOIN}
* @exception {SSS_INVALID_SRCH_OPERATOR}
* @exception {SSS_INVALID_SRCH_COL_NAME}
* @exception {SSS_INVALID_SRCH_COL_JOIN}
*
* @since 2007.0
*/
exports.nlapiSearchRecord = (type, id, filters, columns) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Perform a global record search across the system.
* @governance 10 units
* @restriction returns the first 1000 rows in the search
*
* @param {string} keywords Global search keywords string or expression.
* @return {nlobjSearchResult[]} Returns an Array of nlobjSearchResult objects containing the following four columns: name, type (as shown in the UI), info1, and info2.
*
* @since 2008.1
*/
exports.nlapiSearchGlobal = (keywords) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Perform a duplicate record search using Duplicate Detection criteria.
* @governance 10 units
* @restriction returns the first 1000 rows in the search
*
* @param {string} type The recordType you are checking duplicates for (for example, customer|lead|prospect|partner|vendor|contact).
* @param {string[]} [fields] array of field names used to detect duplicate (for example, companyname|email|name|phone|address1|city|state|zipcode).
* @param {int} [id] internal ID of existing record. Depending on the use case, id may or may not be a required argument.
* @return {nlobjSearchResult[]} Returns an Array of nlobjSearchResult objects corresponding to the duplicate records.
*
* @since 2008.1
*/
exports.nlapiSearchDuplicate = (type, fields, id) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Create a new record using values from an existing record of a different type.
* @governance 10 units for transactions, 2 for custom records, 4 for all other records
*
* @param {string} type The record type name.
* @param {int} id The internal ID for the record.
* @param {string} transformType The recordType you are transforming the existing record into.
* @param {Object} [transformValues] An object containing transform default option/value pairs used to pre-configure transformed record
* @return {nlobjRecord}
*
* @exception {SSS_INVALID_URL_CATEGORY}
* @exception {SSS_CATEGORY_ARG_REQD}
* @exception {SSS_INVALID_TASK_ID}
* @exception {SSS_TASK_ID_REQD}
* @exception {SSS_INVALID_INTERNAL_ID}
* @exception {SSS_INVALID_EDITMODE_ARG}
*
* @since 2007.0
*/
exports.nlapiTransformRecord = (type, id, transformType, transformValues) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* void a transaction based on type and id .
* @governance 10 units for transactions
*
* @param {string} type The transaction type name.
* @param {string} id The internal ID for the record.
* @return {string} if accounting preference is reversing journal, then it is new journal id,
* otherwise, it is the input record id
*
* @since 2014.1
*/
exports.nlapiVoidTransaction = (type, id) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Fetch the value of one or more fields on a record. This API uses search to look up the fields and is much
* faster than loading the record in order to get the field.
* @governance 10 units for transactions, 2 for custom records, 4 for all other records
*
* @param {string} type The record type name.
* @param {int} id The internal ID for the record.
* @param {string, string[]} fields - field or fields to look up.
* @param {boolean} [text] If set then the display value is returned instead for select fields.
* @return {string, Object} single value or an Object of field name/value pairs depending on the fields argument.
*
* @since 2008.1
*/
exports.nlapiLookupField = (type,id,fields, text) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Submit the values of a field or set of fields for an existing record.
* @governance 10 units for transactions, 2 for custom records, 4 for all other records
* @restriction only supported for records and fields where DLE (Direct List Editing) is supported
*
* @param {string} type The record type name.
* @param {int} id The internal ID for the record.
* @param {string, string[]} fields field or fields being updated.
* @param {string, string[]} values field value or field values used for updating.
* @param {boolean} [doSourcing] If not set, this argument defaults to false and field sourcing does not occur.
* @return {void}
*
* @since 2008.1
*/
exports.nlapiSubmitField = (type,id,fields,values,doSourcing) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Attach a single record to another with optional properties.
* @governance 10 units
*
* @param {string} type1 The record type name being attached
* @param {int} id1 The internal ID for the record being attached
* @param {string} type2 The record type name being attached to
* @param {int} id2 The internal ID for the record being attached to
* @param {Object} [properties] Object containing name/value pairs used to configure attach operation
* @return {void}
*
* @since 2008.2
*/
exports.nlapiAttachRecord = (type1, id1, type2, id2, properties) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Detach a single record from another with optional properties.
* @governance 10 units
*
* @param {string} type1 The record type name being attached
* @param {int} id1 The internal ID for the record being attached
* @param {string} type2 The record type name being attached to
* @param {int} id2 The internal ID for the record being attached to
* @param {Object} [properties] Object containing name/value pairs used to configure detach operation
* @return {void}
*
* @since 2008.2
*/
exports.nlapiDetachRecord = (type1, id1, type2, id2, properties) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Resolve a URL to a resource or object in the system.
*
* @param {string} type type specifier for URL: suitelet|tasklink|record|mediaitem
* @param {string} subtype subtype specifier for URL (corresponding to type): scriptid|taskid|recordtype|mediaid
* @param {string} [id] internal ID specifier (sub-subtype corresponding to type): deploymentid|n/a|recordid|n/a
* @param {string} [pagemode] string specifier used to configure page (suitelet: external|internal, tasklink|record: edit|view)
* @return {string}
*
* @since 2007.0
*/
exports.nlapiResolveURL = (type, subtype, id, pagemode) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Redirect the user to a page. Only valid in the UI on Suitelets and User Events. In Client scripts this will initialize the redirect URL used upon submit.
*
* @param {string} type type specifier for URL: suitelet|tasklink|record|mediaitem
* @param {string} subtype subtype specifier for URL (corresponding to type): scriptid|taskid|recordtype|mediaid
* @param {string} [id] internal ID specifier (sub-subtype corresponding to type): deploymentid|n/a|recordid|n/a
* @param {string} [pagemode] string specifier used to configure page (suitelet: external|internal, tasklink|record: edit|view)
* @param {Object} [parameters] Object used to specify additional URL parameters as name/value pairs
* @return {void}
*
* @since 2007.0
*/
exports.nlapiSetRedirectURL = (type, subtype, id, pagemode, parameters) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Request a URL to an external or internal resource.
* @restriction NetSuite maintains a white list of CAs that are allowed for https requests. Please see the online documentation for the complete list.
* @governance 10 units
*
* @param {string} url A fully qualified URL to an HTTP = (s) resource
* @param {string, Object} [postdata] - string, document, or Object containing POST payload
* @param {Object} [headers] - Object containing request headers.
* @param {function} [callback] - available on the Client to support asynchronous requests. exports.is passed an nlobjServerResponse with the results.
* @return {nlobjServerResponse}
*
* @exception {SSS_UNKNOWN_HOST}
* @exception {SSS_INVALID_HOST_CERT}
* @exception {SSS_REQUEST_TIME_EXCEEDED}
*
* @since 2007.0
*/
exports.nlapiRequestURL = (url, postdata, headers, callback, method) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return context information about the current user/script.
*
* @return {nlobjContext}
*
* @since 2007.0
*/
exports.nlapiGetContext = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the internal ID for the currently logged in user. Returns -4 when called from online forms or "Available without Login" Suitelets.
*
* @return {int}
*
* @since 2005.0
*/
exports.nlapiGetUser = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the internal ID for the current user's role. Returns 31 (Online Form User) when called from online forms or "Available without Login" Suitelets.
*
* @return {int}
*
* @since 2005.0
*/
exports.nlapiGetRole = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the internal ID for the current user's department.
*
* @return {int}
*
* @since 2005.0
*/
exports.nlapiGetDepartment = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the internal ID for the current user's location.
*
* @return {int}
*
* @since 2005.0
*/
exports.nlapiGetLocation = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the internal ID for the current user's subsidiary.
*
* @return {int}
*
* @since 2008.1
*/
exports.nlapiGetSubsidiary = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the recordtype corresponding to the current page or userevent script.
*
* @return {string}
*
* @since 2007.0
*/
exports.nlapiGetRecordType = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the internal ID corresponding to the current page or userevent script.
*
* @return {int}
*
* @since 2007.0
*/
exports.nlapiGetRecordId = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Send out an email and associate it with records in the system.
* Supported base types are entity for entities, transaction for transactions, activity for activities and cases, record|recordtype for custom records
* @governance 10 units
* @restriction all outbound emails subject to email Anti-SPAM policies
*
* @param {int} from internal ID for employee user on behalf of whom this email is sent
* @param {string, int} to email address or internal ID of user that this email is being sent to
* @param {string} subject email subject
* @param {string} body email body
* @param {string, string[]} cc copy email address = (es)
* @param {string, string[]} bcc blind copy email address = (es)
* @param {Object} records Object of base types -> internal IDs used to associate email to records. i.e. {entity: 100, record: 23, recordtype: customrecord_surveys}
* @param {nlobjFile[]} files array of nlobjFile objects (files) to include as attachments
* @param {boolean} notifySenderOnBounce controls whether or not the sender will receive email notification of bounced emails (defaults to false)
* @param {boolean} internalOnly controls or not the resultingMmessage record will be visible to non-employees on the Communication tab of attached records (defaults to false)
* @param {string} replyTo email reply-to address
* @return {void}
*
* @since 2007.0
*/
exports.nlapiSendEmail = (from, to, subject, body, cc, bcc, records, files, notifySenderOnBounce, internalOnly, replyTo) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Sends a single on-demand campaign email to a specified recipient and returns a campaign response ID to track the email.
* @governance 10 units
* @restriction works in conjunction with the Lead Nurturing (campaigndrip) sublist only
*
* @param {int} campaigneventid internal ID of the campaign event
* @param {int} recipientid internal ID of the recipient - the recipient must have an email
* @return {int}
*
* @since 2010.1
*/
exports.nlapiSendCampaignEmail = (campaigneventid, recipientid) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Send out a fax and associate it with records in the system. This requires fax preferences to be configured.
* Supported base types are entity for entities, transaction for transactions, activity for activities and cases, record|recordtype for custom records
* @governance 10 units
*
* @param {int} from internal ID for employee user on behalf of whom this fax is sent
* @param {string, int} to fax address or internal ID of user that this fax is being sent to
* @param {string} subject fax subject
* @param {string} body fax body
* @param {Object} records Object of base types -> internal IDs used to associate fax to records. i.e. {entity: 100, record: 23, recordtype: customrecord_surveys}
* @param {nlobjFile[]} files array of nlobjFile objects (files) to include as attachments
* @return {void}
*
* @since 2008.2
*/
exports.nlapiSendFax = (from, to, subject, body, records, files) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return field definition for a field.
*
* @param {string} fldnam the name of the field
* @return {nlobjField}
*
* @since 2009.1
*/
exports.nlapiGetField = (fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return field definition for a matrix field.
*
* @param {string} type matrix sublist name
* @param {string} fldnam matrix field name
* @param {int} column matrix field column index (1-based)
* @return {nlobjField}
*
* @since 2009.2
*/
exports.nlapiGetMatrixField = (type, fldnam, column) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return field definition for a sublist field.
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} [linenum] line number for sublist field (1-based) and only valid for sublists of type staticlist and list
* @return {nlobjField}
*
* @since 2009.1
*/
exports.nlapiGetLineItemField = (type, fldnam, linenum) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return an nlobjField containing sublist field metadata.
*
* @param {string} type matrix sublist name
* @param {string} fldnam matrix field name
* @param {int} linenum line number (1-based)
* @param {int} column matrix column index (1-based)
* @return {nlobjField}
*
* @since 2009.2
*/
exports.nlapiGetLineItemMatrixField = (type, fldnam, linenum, column) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the value of a field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} fldnam the field name
* @return {string}
*
* @since 2005.0
*/
exports.nlapiGetFieldValue = (fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @restriction synchronous arg is only supported in client SuiteScript
*
* @param {string} fldnam the field name
* @param {string} value value used to set field
* @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true)
* @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false).
* @return {void}
*
* @since 2005.0
*/
exports.nlapiSetFieldValue = (fldnam,value,firefieldchanged,synchronous) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the display value of a select field's current selection on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} fldnam the field name
* @return {string}
*
* @since 2005.0
*/
exports.nlapiGetFieldText = (fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a field on the current record on a page using it's label.
* @restriction synchronous arg is only supported in client SuiteScript
*
* @param {string} fldnam the field name
* @param {string} txt display name used to lookup field value
* @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true)
* @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false).
* @return {void}
*
* @since 2005.0
*/
exports.nlapiSetFieldText = (fldnam,txt,firefieldchanged,synchronous) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the values of a multiselect field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} fldnam the field name
* @return {string[]}
*
* @since 2005.0
*/
exports.nlapiGetFieldValues = (fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the values of a multiselect field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @restriction synchronous arg is only supported in client SuiteScript
*
* @param {string} fldnam field name
* @param {string[]} values array of strings containing values for field
* @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true)
* @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false).
* @return {void}
*
* @since 2005.0
*/
exports.nlapiSetFieldValues = (fldnam,values,firefieldchanged,synchronous) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the values (via display text) of a multiselect field on the current record.
* @restriction supported in client and user event scripts only.
* @param {string} fldnam field name
* @return {string[]}
*
* @since 2009.1
*/
exports.nlapiGetFieldTexts = (fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the values (via display text) of a multiselect field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @restriction synchronous arg is only supported in client SuiteScript
*
* @param {string} fldnam field name
* @param {string[]} texts array of strings containing display values for field
* @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true)
* @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false).
* @return {void}
*
* @since 2009.1
*/
exports.nlapiSetFieldTexts = (fldnam,texts,firefieldchanged,synchronous) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Get the value of a matrix header field
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} column matrix column index (1-based)
* @return {string}
*
* @since 2009.2
*/
exports.nlapiGetMatrixValue = (type, fldnam, column) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a matrix header field
* @restriction synchronous arg is only supported in client SuiteScript
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} column matrix column index (1-based)
* @param {string} value field value for matrix field
* @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true)
* @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false).
* @return {void}
*
* @since 2009.2
*/
exports.nlapiSetMatrixValue = (type, fldnam, column, value, firefieldchanged, synchronous) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Get the current value of a sublist field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} column matrix column index (1-based)
* @return {string} value
*
* @since 2009.2
*/
exports.nlapiGetCurrentLineItemMatrixValue = (type, fldnam, column) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the current value of a sublist field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @restriction synchronous arg is only supported in Client SuiteScript
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} column matrix column index (1-based)
* @param {string} value matrix field value
* @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true)
* @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false).
* @return {void}
*
* @since 2009.2
*/
exports.nlapiSetCurrentLineItemMatrixValue = (type, fldnam, column, value, firefieldchanged, synchronous) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the value of a sublist matrix field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} linenum line number (1-based)
* @param {int} column column index (1-based)
* @param {string} value
*
* @since 2009.2
*/
exports.nlapiGetLineItemMatrixValue = (type, fldnam, linenum, column) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the value of a sublist field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} linenum line number (1-based)
* @return {string}
*
* @since 2005.0
*/
exports.nlapiGetLineItemValue = (type,fldnam,linenum) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the value of a sublist field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} linenum line number (1-based)
* @return {string}
*
* @since 2013.2
*/
exports.nlapiGetLineItemDateTimeValue = (type,fldnam,linenum) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the value of a sublist field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} linenum line number (1-based)
* @param {string} timezone value
* @return {string}
*
* @since 2013.2
*/
exports.nlapiGetLineItemDateTimeValue = (type,fldnam,linenum,timezone) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a sublist field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} linenum line number (1-based)
* @param {string} value
* @retun {void}
*
* @since 2005.0
*/
exports.nlapiSetLineItemValue = (type,fldnam,linenum,value) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a sublist field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} linenum line number (1-based)
* @param {string} datetime value
* @retun {void}
*
* @since 2013.2
*/
exports.nlapiSetLineItemDateTimeValue = (type,fldnam,linenum,value) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a sublist field on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} linenum line number (1-based)
* @param {string} datetime value
* @param {string} timezone value
* @retun {void}
*
* @since 2013.2
*/
exports.nlapiSetLineItemDateTimeValue = (type,fldnam,linenum,value,timezone) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the label of a select field's current selection for a particular line.
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {int} linenum line number (1-based)
* @return {string}
*
* @since 2005.0
*/
exports.nlapiGetLineItemText = (type,fldnam,linenum) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the 1st line number that a sublist field value appears in
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {string} val the value being queried for in a sublist field
* @return {int}
*
* @since 2009.2
*/
exports.nlapiFindLineItemValue = (type, fldnam, val) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the 1st line number that a matrix field value appears in
*
* @param {string} type sublist name
* @param {string} fldnam matrix field name
* @param {int} column matrix column index (1-based)
* @param {string} val the value being queried for in a matrix field
* @return {int}
*
* @since 2009.2
*/
exports.nlapiFindLineItemMatrixValue = (type, fldnam, column, val) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the number of columns for a matrix field
*
* @param {string} type sublist name
* @param {string} fldnam matrix field name
* @return {int}
*
* @since 2009.2
*/
exports.nlapiGetMatrixCount = (type, fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the number of sublists in a sublist on the current record on a page.
* @restriction supported in client and user event scripts only.
* @param {string} type sublist name
* @return {int}
*
* @since 2005.0
*/
exports.nlapiGetLineItemCount = (type) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Insert and select a new line into the sublist on a page or userevent.
*
* @param {string} type sublist name
* @param {int} [line] line number at which to insert a new line.
* @return{void}
*
* @since 2005.0
*/
exports.nlapiInsertLineItem = (type, line) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Remove the currently selected line from the sublist on a page or userevent.
*
* @param {string} type sublist name
* @param {int} [line] line number to remove.
* @return {void}
*
* @since 2005.0
*/
exports.nlapiRemoveLineItem = (type, line) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a field on the currently selected line.
* @restriction synchronous arg is only supported in client SuiteScript
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {string} value field value
* @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true)
* @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false).
* @return {void}
*
* @since 2005.0
*/
exports.nlapiSetCurrentLineItemValue = (type,fldnam,value,firefieldchanged,synchronous) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a field on the currently selected line.
* @restriction synchronous arg is only supported in client SuiteScript
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {string} value field value
* @return {void}
*
* @since 2013.2
*/
exports.nlapiSetCurrentLineItemDateTimeValue = (type,fldnam,value) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a field on the currently selected line.
* @restriction synchronous arg is only supported in client SuiteScript
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {string} value field value
* @param {string} timezone value
* @return {void}
*
* @since 2013.2
*/
exports.nlapiSetCurrentLineItemDateTimeValue = (type,fldnam,value,timezone) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Set the value of a field on the currently selected line using it's label.
* @restriction synchronous arg is only supported in client SuiteScript
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {string} txt string containing display value or search text.
* @param {boolean} [firefieldchanged] if false then the field change event is suppressed (defaults to true)
* @param {boolean} [synchronous] if true then sourcing and field change execution happens synchronously (defaults to false).
* @return {void}
*
* @since 2005.0
*/
exports.nlapiSetCurrentLineItemText = (type,fldnam,txt,firefieldchanged,synchronous) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the value of a field on the currently selected line.
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @return {string}
*
* @since 2005.0
*/
exports.nlapiGetCurrentLineItemValue = (type,fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the value of a field on the currently selected line.
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @return {string}
*
* @since 2013.2
*/
exports.nlapiGetCurrentLineItemDateTimeValue = (type,fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the value of a field on the currently selected line.
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {string} timezone value
* @return {string}
*
* @since 2013.2
*/
exports.nlapiGetCurrentLineItemDateTimeValue = (type,fldnam, timezone) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the label of a select field's current selection on the currently selected line.
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @return {string}
*
* @since 2005.0
*/
exports.nlapiGetCurrentLineItemText = (type,fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return the line number for the currently selected line.
*
* @param {string} type sublist name
* @return {int}
*
* @since 2005.0
*/
exports.nlapiGetCurrentLineItemIndex = (type) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Disable a sublist field.
* @restriction Only supported on sublists of type inlineeditor, editor and list (current field only)
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {boolean} disable if true then field is disabled
* @param {int} linenum line number for sublist field (1-based) and only valid for sublists of type list
* @return {void}
*
* @since 2009.1
*/
exports.nlapiSetLineItemDisabled = (type,fldnam,disable, linenum) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return field mandatoriness.
*
* @param {string} fldnam field name
* @return {boolean}
*
* @since 2009.1
*/
exports.nlapiGetFieldMandatory = (fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return sublist field mandatoriness.
* @restriction Only supported on sublists of type inlineeditor or editor (current field only)
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @return {boolean}
*
* @since 2009.1
*/
exports.nlapiGetLineItemMandatory = (type,fldnam) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Make a field mandatory.
*
* @param {string} fldnam field name
* @param {boolean} mandatory if true then field is made mandatory
* @return {void}
*
* @since 2009.1
*/
exports.nlapiSetFieldMandatory = (fldnam,mandatory) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Make a sublist field mandatory.
* @restriction Only supported on sublists of type inlineeditor or editor (current field only)
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {boolean} mandatory if true then field is made mandatory
* @return {void}
*
* @since 2009.2
*/
exports.nlapiSetLineItemMandatory = (type,fldnam,mandatory) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Select an existing line in a sublist.
*
* @param {string} type sublist name
* @param {int} linenum line number to select
* @return {void}
*
* @since 2005.0
*/
exports.nlapiSelectLineItem = (type, linenum) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Save changes made on the currently selected line to the sublist.
*
* @param {string} type sublist name
* @return {void}
*
* @since 2005.0
*/
exports.nlapiCommitLineItem = (type) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Cancel any changes made on the currently selected line.
* @restriction Only supported for sublists of type inlineeditor and editor
*
* @param {string} type sublist name
* @return {void}
*
* @since 2005.0
*/
exports.nlapiCancelLineItem = (type) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Select a new line in a sublist.
* @restriction Only supported for sublists of type inlineeditor and editor
*
* @param {string} type sublist name
* @return {void}
*
* @since 2005.0
*/
exports.nlapiSelectNewLineItem = (type) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Refresh the sublist table.
* @restriction Only supported for sublists of type inlineeditor, editor, and staticlist
* @restriction Client SuiteScript only.
*
* @param {string} type sublist name
* @return{void}
*
* @since 2005.0
*/
exports.nlapiRefreshLineItems = (type) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Adds a select option to a scripted select or multiselect field.
* @restriction Client SuiteScript only
*
* @param {string} fldnam field name
* @param {string} value internal ID for select option
* @param {string} text display text for select option
* @param {boolean} [selected] if true then option will be selected by default
* @return {void}
*
* @since 2008.2
*/
exports.nlapiInsertSelectOption = (fldnam, value, text, selected) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Removes a select option (or all if value is null) from a scripted select or multiselect field.
* @restriction Client SuiteScript only
*
* @param {string} fldnam field name
* @param {string} value internal ID of select option to remove
* @return {void}
*
* @since 2008.2
*/
exports.nlapiRemoveSelectOption = (fldnam, value) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Adds a select option to a scripted select or multiselect sublist field.
* @restriction Client SuiteScript only
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {string} value internal ID for select option
* @param {string} text display text for select option
* @param {boolean} [selected] if true then option will be selected by default
* @return {void}
*
* @since 2008.2
*/
exports.nlapiInsertLineItemOption = (type, fldnam, value, text, selected) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Removes a select option (or all if value is null) from a scripted select or multiselect sublist field.
* @restriction Client SuiteScript only
*
* @param {string} type sublist name
* @param {string} fldnam sublist field name
* @param {string} value internal ID for select option to remove
* @return {void}
*
* @since 2008.2
*/
exports.nlapiRemoveLineItemOption = (type, fldnam, value) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Returns true if any changes have been made to a sublist.
* @restriction Client SuiteScript only
*
* @param {string} type sublist name
* @return {boolean}
*
* @since 2005.0
*/
exports.nlapiIsLineItemChanged = (type) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return an record object containing the data being submitted to the system for the currenr record.
* @restriction User Event scripts only
*
* @return {nlobjRecord}
*
* @since 2008.1
*/
exports.nlapiGetNewRecord = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return an record object containing the current record's data prior to the write operation.
* @restriction beforeSubmit|afterSubmit User Event scripts only
*
* @return {nlobjRecord}
*
* @since 2008.1
*/
exports.nlapiGetOldRecord = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Create an nlobjError object that can be used to abort script execution and configure error notification
*
* @param {string} code error code
* @param {string} details error description
* @param {boolean} [suppressEmail] if true then suppress the error notification emails from being sent out (false by default).
* @return {nlobjError}
*
* @since 2008.2
*/
exports.nlapiCreateError = (code,details,suppressEmail) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return a new entry form page.
* @restriction Suitelets only
*
* @param {string} title page title
* @param {boolean} [hideHeader] true to hide the page header (false by default)
* @return {nlobjForm}
*
* @since 2008.2
*/
exports.nlapiCreateForm = (title, hideHeader) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return a new list page.
* @restriction Suitelets only
*
* @param {string} title page title
* @param {boolean} [hideHeader] true to hide the page header (false by default)
* @return {nlobjList}
*
* @since 2008.2
*/
exports.nlapiCreateList = (title, hideHeader) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return a new assistant page.
* @restriction Suitelets only
*
* @param {string} title page title
* @param {boolean} [hideHeader] true to hide the page header (false by default)
* @return {nlobjAssistant}
*
* @since 2009.2
*/
exports.nlapiCreateAssistant = (title, hideHeader) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Load a file from the file cabinet (via its internal ID or path).
* @governance 10 units
* @restriction Server SuiteScript only
*
* @param {string, int} id internal ID or relative path to file in the file cabinet (i.e. /SuiteScript/foo.js)
* @return {nlobjFile}
*
* @since 2008.2
*/
exports.nlapiLoadFile = (id) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Add/update a file in the file cabinet.
* @governance 20 units
* @restriction Server SuiteScript only
*
* @param {nlobjFile} file a file object to submit
* @return {int} return internal ID of file
*
* @since 2009.1
*/
exports.nlapiSubmitFile = (file) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Delete a file from the file cabinet.
* @governance 20 units
* @restriction Server SuiteScript only
*
* @param {int} id internal ID of file to be deleted
* @return {id}
*
* @since 2009.1
*/
exports.nlapiDeleteFile = (id) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Instantiate a file object (specifying the name, type, and contents which are base-64 encoded for binary types.)
* @restriction Server SuiteScript only
*
* @param {string} name file name
* @param {string} type file type i.e. plainText, htmlDoc, pdf, word (see documentation for the list of supported file types)
* @param {string} contents string containing file contents (must be base-64 encoded for binary types)
* @return {nlobjFile}
*
* @since 2009.1
*/
exports.nlapiCreateFile = (name, type, contents) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Perform a mail merge operation using any template and up to 2 records and returns an nlobjFile with the results.
* @restriction only supported for record types that are available in mail merge: transactions, entities, custom records, and cases
* @restriction Server SuiteScript only
* @governance 10 units
*
* @param {int} id internal ID of template
* @param {string} baseType primary record type
* @param {int} baseId internal ID of primary record
* @param {string} [altType] secondary record type
* @param {int} [altId] internal ID of secondary record
* @param {Object} [fields] Object of merge field values to use in the mail merge (by default all field values are obtained from records) which overrides those from the record.
* @return {nlobjFile}
*
* @since 2008.2
*/
exports.nlapiMergeRecord = (id, baseType, baseId, altType, altId, fields) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Print a record (transaction) gievn its type, id, and output format.
* @restriction Server SuiteScript only
* @governance 10 units
*
* @param {string} type print output type: transaction|statement|packingslip|pickingticket
* @param {int} id internal ID of record to print
* @param {string} [format] output format: html|pdf|default
* @param {Object} [properties] Object of properties used to configure print
* @return {nlobjFile}
*
* @since 2008.2
*/
exports.nlapiPrintRecord = (type, id, format, properties) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Generate a PDF from XML using the BFO report writer (see http://big.faceless.org/products/report/).
* @restriction Server SuiteScript only
* @governance 10 units
*
* @param {string} input string containing BFO compliant XHTML
* @return {nlobjFile}
*
* @since 2009.1
*/
exports.nlapiXMLToPDF = (input) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Create a template renderer used to generate various outputs based on a template.
* @restriction Server SuiteScript only
* @governance 10 units
*
* @param {string} type media type: pdf|html
* @param {string} [engineType] [optional]: default is freemarker/html
* @return {nlobjTemplateRenderer}
*
*/
exports.nlapiCreateTemplateRenderer = () => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Create an email merger used to assemble subject and body text of an email from a given
* FreeMarker template and a set of associated records.
* @restriction Server SuiteScript only
*
* @param {int} templateId internal ID of the template
* @return {nlobjEmailMerger}
*
* @since 2015.1
*/
exports.nlapiCreateEmailMerger = (id) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Create an entry in the script execution log (note that execution log entries are automatically purged after 30 days).
*
* @param {string} type log type: debug|audit|error|emergency
* @param {string} title log title (up to 90 characters supported)
* @param {string} [details] log details (up to 3000 characters supported)
* @return {void}
*
* @since 2008.1
*/
exports.nlapiLogExecution = (type, title, details) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Queue a scheduled script for immediate execution and return the status QUEUED if successfull.
* @restriction Server SuiteScript only
* @governance 20 units
*
* @param {string, int} script script ID or internal ID of scheduled script
* @param {string, int} [deployment] script ID or internal ID of scheduled script deployment. If empty, the first "free" deployment (i.e. status = Not Scheduled or Completed) will be used
* @param {Object} parameters Object of parameter name->values used in this scheduled script instance
* @return {string} QUEUED or null if no available deployments were found or the current status of the deployment specified if it was not available.
*
* @since 2008.1
*/
exports.nlapiScheduleScript = (script, deployment, parameters) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Return a URL with a generated OAuth token.
* @restriction Suitelets and Portlets only
* @governance 20 units
*
* @param {string} ssoAppKey
* @return {string}
*
* @since 2009.2
*/
exports.nlapiOutboundSSO = (ssoAppKey) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Loads a configuration record
* @restriction Server SuiteScript only
* @governance 10 units
*
* @param {string} type
* @return {nlobjConfiguration}
*
* @since 2009.2
*/
exports.nlapiLoadConfiguration = (type) => { throw nlapiCreateError('SSS_NOT_YET_SUPPORTED'); };
/**
* Commits all ch