
Version 2015 Release 2 introduces the beta version of SuiteScript 2.0, a complete re-factor of the SuiteScript model. SuiteScript 2.0 is built on modularity. With it, you have access to a complete set of new APIs, contained within modules. These modules are organized based on behaviour. SuiteScript 2.0 also enables you to create your own custom modules.
SuiteScript 2.0 libraries
SuiteScript 1.0 API | SuiteScript 2.0 API | SuiteScript 2.0 Module |
---|---|---|
nlapiAddDays(d, days) | N/A | N/A |
nlapiAddMonths(d, months) | N/A | N/A |
nlapiAttachRecord(type, id, type2, id2, attributes) | record.attach(options) | N/record Module |
nlapiCancelLineItem(type) | CurrentRecord.cancelLine(options) | N/currentRecord Module |
nlapiCommitLineItem(type) | CurrentRecord.commitLine(options) | N/currentRecord Module |
nlapiCopyRecord(type, id, initializeValues) | record.copy(options) | N/record Module |
nlapiCreateAssistant(title, hideHeader) | serverWidget.createAssistant(options) | N/ui/serverWidget Module |
nlapiCreateCSVImport( ) | task.create(options) | N/task Module |
nlapiCreateCurrentLineItemSubrecord(sublist, fldname) | Record.getCurrentSublistSubrecord(options) | N/record Module |
nlapiCreateEmailMerger(templateId) | render.mergeEmail(options) | N/render Module |
nlapiCreateError(code, details, suppressNotification) | error.create(options) | N/error Module |
nlapiCreateFile(name, type, contents) | file.create(options) | N/file Module |
nlapiCreateForm(title, hideNavbar) | serverWidget.createForm(options) | N/ui/serverWidget Module |
nlapiCreateList(title, hideNavbar) | serverWidget.createList(options) | N/ui/serverWidget Module |
nlapiCreateRecord(type, initializeValues) | record.create(options) | N/record Module |
nlapiCreateReportDefinition() | N/A | N/A |
nlapiCreateReportForm(title) | N/A | N/A |
nlapiCreateSearch(type, filters, columns) | search.create(options) | N/search Module |
nlapiCreateSubrecord(fldname) | CurrentRecord.getSubrecord(options) | N/currentRecord Module |
nlapiCreateTemplateRenderer() | render.create() | N/render Module |
nlapiDateToString(d, format) | format.format(options) | N/format Module |
nlapiDeleteFile(id) | file.delete(options) | N/file Module |
nlapiDeleteRecord(type, id, initializeValues) | record.delete(options) | N/record Module |
nlapiDetachRecord(type, id, type2, id2, attributes) | record.detach(options) | N/record Module |
nlapiDisableField(fldnam, val) | Field.isDisabled | N/currentRecord Module |
nlapiDisableLineItemField(type, fldnam, val) | ||
nlapiEditCurrentLineItemSubrecord(sublist, fldname) | Record.getCurrentSublistSubrecord(options) | N/record Module |
nlapiEditSubrecord(fldname) | Record.getSubrecord(options) | N/record Module |
nlapiEncrypt(s, algorithm, key) | N/A | N/A |
nlapiEscapeXML(text) | xml.escape(options) | N/xml Module |
nlapiExchangeRate(sourceCurrency, targetCurrency, effectiveDate) | currency.exchangeRate(options) | N/currency Module |
nlapiFindLineItemMatrixValue(type, fldnam, val, column) | CurrentRecord.findMatrixSublistLineWithValue(options) | N/currentRecord Module |
nlapiFindLineItemValue(type, fldnam, val) | CurrentRecord.findSublistLineWithValue(options) | N/currentRecord Module |
nlapiFormatCurrency(str) | format.format(options) | N/format Module |
nlapiGetContext() | runtime.getCurrentScript() | N/runtime Module |
runtime.getCurrentSession() | ||
runtime.getCurrentUser() | ||
nlapiGetCurrentLineItemDateTimeValue(type, fieldId, timeZone) | N/A | N/format Module |
nlapiGetCurrentLineItemIndex(type) | CurrentRecord.getCurrentSublistIndex(options) | N/currentRecord Module |
nlapiGetCurrentLineItemMatrixValue(type, fldnam, column) | CurrentRecord.getCurrentMatrixSublistValue(options) | N/currentRecord Module |
nlapiGetCurrentLineItemText(type, fldnam) | CurrentRecord.getCurrentSublistText(options) | N/currentRecord Module |
nlapiGetCurrentLineItemValue(type, fldnam) | CurrentRecord.getCurrentSublistValue(options) | N/currentRecord Module |
nlapiGetCurrentLineItemValues(type, fldnam) | CurrentRecord.getCurrentSublistValue(options) | N/currentRecord Module |
nlapiGetDateTimeValue(fieldId, timeZone) | N/A | N/format Module |
nlapiGetDepartment() | User.department | N/runtime Module |
nlapiGetField(fldnam) | CurrentRecord.getField(options) | N/currentRecord Module |
nlapiGetFieldText(fldnam) | CurrentRecord.getText(options) | N/currentRecord Module |
nlapiGetFieldTexts(fldnam) | CurrentRecord.getText(options) | N/currentRecord Module |
nlapiGetFieldValue(fldnam) | CurrentRecord.getValue(options) | N/currentRecord Module |
nlapiGetFieldValues(fldnam) | CurrentRecord.getValue(options) | N/currentRecord Module |
nlapiGetJobManager(jobType) | task.create(options) | N/task Module |
nlapiGetLineItemCount(type) | CurrentRecord.getLineCount(options) | N/currentRecord Module |
nlapiGetLineItemDateTimeValue(type, fieldId, lineNum, timeZone) | N/A | N/format Module |
nlapiGetLineItemField(type, fldnam, linenum) | CurrentRecord.getSublistField(options) | N/currentRecord Module |
nlapiGetLineItemMatrixField(type, fldnam, linenum, column) | CurrentRecord.getMatrixSublistField(options) | N/currentRecord Module |
nlapiGetLineItemMatrixValue(type, fldnam, linenum, column) | CurrentRecord.getMatrixSublistValue(options) | N/currentRecord Module |
nlapiGetLineItemText(type, fldnam, linenum) | CurrentRecord.getSublistText(options) | N/currentRecord Module |
nlapiGetLineItemValue(type, fldnam, linenum) | CurrentRecord.getSublistValue(options) | N/currentRecord Module |
nlapiGetLineItemValues(type, fldname, linenum) | CurrentRecord.getSublistValue(options) | N/currentRecord Module |
nlapiGetLocation() | User.location | N/runtime Module |
nlapiGetLogin() | auth.changeEmail(options) | N/auth Module |
auth.changePassword(options) | ||
nlapiGetMatrixCount(type, fldnam) | CurrentRecord.getMatrixHeaderCount(options) | N/currentRecord Module |
nlapiGetMatrixField(type, fldnam, column) | CurrentRecord.getMatrixHeaderField(options) | N/currentRecord Module |
nlapiGetMatrixValue(type, fldnam, column) | CurrentRecord.getMatrixHeaderValue(options) | N/currentRecord Module |
nlapiGetRecordId() | Record.id | N/record Module |