SuiteScript 1.0 to SuiteScript 2.x API Map – Functions (nlapi)

This topic maps SuiteScript 1.0 Functions (prefixed with “nlapi”) to their corresponding SuiteScript 2.x APIs. All functions are listed alphabetically in one table.

Note:

NetSuite does not support calling SuiteScript 1.0 APIs from SuiteScript 2.x scripts.

Note:

To view a mapping of SuiteScript 1.0 Objects (prefixed with “nlobj”) to their corresponding SuiteScript 2.x APIs, see SuiteScript 1.0 to SuiteScript 2.x API Map – Objects (nlobj).

SuiteScript 1.0 API

SuiteScript 2.x API

SuiteScript 2.x Module

Notes

nlapiAddDays(d, days)

See Notes

See Notes

This API does not have a SuiteScript 2.x equivalent.

Use the following JavaScript to add or subtract days from a Date object: dateObj.setDate(dateObj.getDate() + or – days)

For example:

                    var tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1); 

                  
Note:

SuiteScript 2.x is also compatible with third-party JavaScript APIs that provide this functionality. For information about using third-party APIs with SuiteScript 2.x, see SuiteScript 2.x Custom Modules.

nlapiAddMonths(d, months)

See Notes

See Notes

This API does not have a SuiteScript 2.x equivalent.

Use the following JavaScript to add or subtract months from a Date object: dateObj.setMonth(dateObj.getMonth() + or – months)

For example:

                    var today = new Date();
var oneMonthAgo = today.setMonth(today.getMonth() - 1); 

                  
Note:

SuiteScript 2.x is also compatible with third-party JavaScript APIs that provide this functionality. For information about using third-party APIs with SuiteScript 2.x, see SuiteScript 2.x Custom Modules.

nlapiAttachRecord(type, id, type2, id2, attributes)

record.attach(options)

N/record Module

                    var recordId = record.attach({
    record: {
        type: record.Type.FILE,
        id: '447'
    },
    to: {
        type: record.type.CUSTOMER,
        id: 530
    }
}); 

                  

nlapiCancelLineItem(type)

Record.cancelLine(options)

CurrentRecord.cancelLine(options)

N/record Module

N/currentRecord Module

nlapiCheckPasswordField(type, id, value, field, sublist, line)

crypto.checkPasswordField(options)

N/crypto Module

nlapiCommitLineItem(type)

Record.commitLine(options)

CurrentRecord.commitLine(options)

N/record Module

N/currentRecord Module

For N/record script samples, see:

nlapiCopyRecord(type, id, initializeValues)

record.copy(options)

N/record Module

                    var recObj = record.copy({
    type: record.Type.SALES_ORDER,
    id: 284,
    isDynamic: true,
    defaultValues: {
        entity: 547
    });
var recordId = recObj.save(); 

                  

nlapiCreateAssistant(title, hideHeader)

serverWidget.createAssistant(options)

N/ui/serverWidget Module

nlapiCreateCSVImport()

task.create(options)

N/task Module

For script samples, see N/task Module.

nlapiCreateCurrentLineItemSubrecord(sublist, fldname)

Record.getCurrentSublistSubrecord(options)

CurrentRecord.getCurrentSublistSubrecord(options)

N/record Module

N/currentRecord Module

Note that scripting subrecords in SuiteScript 2.x is fundamentally different from scripting subrecords in SuiteScript 1.0. For additional information, see the SuiteScript 2.x topics under SuiteScript 2.x Scripting Subrecords.

nlapiCreateEmailMerger(templateId)

render.mergeEmail(options)

N/render Module

nlapiCreateError(code, details, suppressNotification)

error.create(options)

N/error Module

For a script sample, see N/error Module Script Samples.

nlapiCreateFile(name, type, contents)

file.create(options)

N/file Module

For a script sample, see N/file Module Script Samples.

nlapiCreateForm(title, hideNavbar)

serverWidget.createForm(options)

N/ui/serverWidget Module

For a script sample, see N/ui/serverWidget Module Script Samples

nlapiCreateList(title, hideNavbar)

serverWidget.createList(options)

N/ui/serverWidget Module

nlapiCreateRecord(type, initializeValues)

record.create(options)

N/record Module

nlapiCreateSearch(type, filters, columns)

search.create(options)

N/search Module

For a script sample, see N/search Module Script Samples.

nlapiCreateSubrecord(fldname)

Record.getSubrecord(options)

CurrentRecord.getSubrecord(options)

N/record Module

N/currentRecord Module

Note that scripting subrecords in SuiteScript 2.x is fundamentally different from scripting subrecords in SuiteScript 1.0. For additional information, see the SuiteScript 2.x topics under SuiteScript 2.x Scripting Subrecords.

nlapiCreateTemplateRenderer()

render.create()

N/render Module

For a script sample, see N/render Module Script Samples.

nlapiDateToString(d, format)

format.format(options)

N/format Module

For a script sample, see N/format Module Script Samples

nlapiDeleteFile(id)

file.delete(options)

N/file Module

nlapiDeleteRecord(type, id)

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

Note that isDisabled is a property.

nlapiDisableLineItemField(type, fldnam, val)

Field.isDisabled

N/currentRecord Module

Note that isDisabled is a property.

nlapiEditCurrentLineItemSubrecord(sublist, fldname)

Record.getCurrentSublistSubrecord(options)

CurrentRecord.getCurrentSublistSubrecord(options)

N/record Module

N/currentRecord Module

Note that scripting subrecords in SuiteScript 2.x is fundamentally different from scripting subrecords in SuiteScript 1.0. For additional information, see the SuiteScript 2.x topics under SuiteScript 2.x Scripting Subrecords.

nlapiEditSubrecord(fldname)

Record.getSubrecord(options)

CurrentRecord.getSubrecord(options)

N/record Module

N/currentRecord Module

Note that scripting subrecords in SuiteScript 2.x is fundamentally different from scripting subrecords in SuiteScript 1.0. For additional information, see the SuiteScript 2.x topics under SuiteScript 2.x Scripting Subrecords.

nlapiEncrypt(s, algorithm, key)

See Notes

See Notes

For SuiteScript 2.x encryption, hashing, and HMAC functionality, see the N/crypto Module module.

For SuiteScript 2.x encoding functionality, see the N/encode Module module.

nlapiEscapeXML(text)

xml.escape(options)

N/xml Module

nlapiExchangeRate(sourceCurrency, targetCurrency, effectiveDate)

currency.exchangeRate(options)

N/currency Module

For a script sample, see N/currency Module Script Sample.

nlapiFindLineItemMatrixValue(type, fldnam, val, column)

Record.findMatrixSublistLineWithValue(options)

CurrentRecord.findMatrixSublistLineWithValue(options)

N/record Module

N/currentRecord Module

nlapiFindLineItemValue(type, fldnam, val)

Record.findSublistLineWithValue(options)

CurrentRecord.findSublistLineWithValue(options)

N/record Module

N/currentRecord Module

nlapiFormatCurrency(str)

format.format(options)

N/format Module

Note that SuiteScript 2.x currency formatting is handled by the N/format module and not the N/currency module.

For a script sample, see N/format Module Script Samples

nlapiGetContext()

runtime.getCurrentScript()

runtime.getCurrentSession()

runtime.getCurrentUser()

N/runtime Module

For a script sample, see N/runtime Module Script Samples.

nlapiGetCurrentLineItemDateTimeValue(type, fieldId, timeZone)

See Notes

N/format Module

Use the N/format module to mimic this functionality in SuiteScript 2.x.

nlapiGetCurrentLineItemIndex(type)

Record.getCurrentSublistIndex(options)

CurrentRecord.getCurrentSublistIndex(options)

N/record Module

N/currentRecord Module

nlapiGetCurrentLineItemMatrixValue(type, fldnam, column)

CurrentRecord.getCurrentMatrixSublistValue(options)

Record.getCurrentMatrixSublistValue(options)

N/record Module

N/currentRecord Module

nlapiGetCurrentLineItemText(type, fldnam)

Record.getCurrentSublistText(options)

CurrentRecord.getCurrentSublistText(options)

N/record Module

N/currentRecord Module

nlapiGetCurrentLineItemValue(type, fldnam)

Record.getCurrentSublistValue(options)

CurrentRecord.getCurrentSublistValue(options)

N/record Module

N/currentRecord Module

nlapiGetCurrentLineItemValues(type, fldnam)

Record.getCurrentSublistValue(options)

CurrentRecord.getCurrentSublistValue(options)

N/record Module

N/currentRecord Module

nlapiGetDateTimeValue(fieldId, timeZone)

See Notes

N/format Module

Use the N/format module to mimic this functionality in SuiteScript 2.x.

nlapiGetDepartment()

User.department

N/runtime Module

nlapiGetField(fldnam)

Record.getField(options)

CurrentRecord.getField(options)

N/record Module

N/currentRecord Module

nlapiGetFieldText(fldnam)

Record.getText(options)

CurrentRecord.getText(options)

N/record Module

N/currentRecord Module

nlapiGetFieldTexts(fldnam)

Record.getText(options)

CurrentRecord.getText(options)

N/record Module

N/currentRecord Module

nlapiGetFieldValue(fldnam)

Record.getValue(options)

CurrentRecord.getValue(options)

N/record Module

N/currentRecord Module

nlapiGetFieldValues(fldnam)

Record.getValue(options)

CurrentRecord.getValue(options)

N/record Module

N/currentRecord Module

nlapiGetJobManager(jobType)

task.create(options)

N/task Module

For a script sample, see N/task Module.

nlapiGetLineItemCount(type)

Record.getLineCount(options)

CurrentRecord.getLineCount(options)

N/record Module

N/currentRecord Module

nlapiGetLineItemDateTimeValue(type, fieldId, value, timeZone)

See Notes

N/format Module

Use the N/format module to mimic this functionality in SuiteScript 2.x.

nlapiGetLineItemField(type, fldnamm, linenum)

Record.getSublistField(options)

CurrentRecord.getSublistField(options)

N/record Module

N/currentRecord Module

SuiteScript 2.x begins sublist numbering with 0. SuiteScript 1.0 begins sublist numbering with 1.

nlapiGetLineItemMatrixField(type, fldnam, linenum, column)

Record.getMatrixSublistField(options)

CurrentRecord.getMatrixSublistField(options)

N/record Module

N/currentRecord Module

SuiteScript 2.x begins sublist numbering with 0. SuiteScript 1.0 begins sublist numbering with 1.

nlapiGetLineItemMatrixValue(type, fldnam, linenum, column)

Record.getMatrixSublistValue(options)

CurrentRecord.getMatrixSublistValue(options)

N/record Module

N/currentRecord Module

SuiteScript 2.x begins sublist numbering with 0. SuiteScript 1.0 begins sublist numbering with 1.

nlapiGetLineItemText(type, fldnam, linenum)

Record.getSublistText(options)

CurrentRecord.getSublistText(options)

N/record Module

N/currentRecord Module

SuiteScript 2.x begins sublist numbering with 0. SuiteScript 1.0 begins sublist numbering with 1.

nlapiGetLineItemValue(type, fldnam, linenum)

Record.getSublistValue(options)

CurrentRecord.getSublistValue(options)

N/record Module

N/currentRecord Module

SuiteScript 2.x begins sublist numbering with 0. SuiteScript 1.0 begins sublist numbering with 1.

nlapiGetLineItemValues(type, fldname, linenum)

Record.getSublistValue(options)

CurrentRecord.getSublistValue(options)

N/record Module

N/currentRecord Module

Method returns an array for multi-select fields.

SuiteScript 2.x begins sublist numbering with 0. SuiteScript 1.0 begins sublist numbering with 1.

nlapiGetLocation()

User.location

N/runtime Module

Note that location is a property.

nlapiGetLogin()

auth.changeEmail(options)

auth.changePassword(options)

N/auth Module

For a script sample, see N/auth Module Script Sample.

nlapiGetMatrixCount(type, fldnam)

Record.getMatrixHeaderCount(options)

CurrentRecord.getMatrixHeaderCount(options)

N/record Module

N/currentRecord Module

nlapiGetMatrixField(type, fldnam, column)

Record.getMatrixHeaderField(options)

CurrentRecord.getMatrixHeaderField(options)

N/record Module

N/currentRecord Module

nlapiGetMatrixValue(type, fldnam, column)

Record.getMatrixHeaderValue(options)

CurrentRecord.getMatrixHeaderValue(options)

N/record Module

N/currentRecord Module

nlapiGetNewRecord()

See Notes

See Notes

To mimic this functionality in SuiteScript 2.x, use the following code in a beforeLoad(context), beforeSubmit(context), or afterSubmit(context) user event script.

                    function afterSubmit(context) {
    var newRec = context.newRecord;
} 

                  

For additional information and a full script sample, see SuiteScript 2.x User Event Script Type

nlapiGetOldRecord()

See Notes

See Notes

To mimic this functionality in SuiteScript 2.x, use the following code in a beforeSubmit(context) or afterSubmit(context) user event script.

                    function afterSubmit(context) {
    var oldRec = context.oldRecord;
} 

                  

For additional information and a full script sample, see SuiteScript 2.x User Event Script Type

nlapiGetRecordId()

Record.id

CurrentRecord.id

N/record Module

N/currentRecord Module

nlapiGetRecordType()

Record.type

CurrentRecord.type

N/record Module

N/currentRecord Module

To get the current record type in a client script, use CurrentRecord.type:

                    function saveRec(context) {
    var rec = context.currentRecord;
    var recType = rec.type;
} 

                  

To get the current record type in a server script, use Record.type in a beforeLoad(context), beforeSubmit(context), or afterSubmit(context) user event script:

                    function beforeSubmit(context) {
    var newRec = context.newRecord;
    var recType = newRec.type;
} 

                  

nlapiGetRole()

User.role

N/runtime Module

nlapiGetSubsidiary()

User.subsidiary

N/runtime Module

nlapiGetUser()

runtime.getCurrentUser()

N/runtime Module

nlapiInitiateWorkflow(recordtype, id, workflowid, initialvalues)

workflow.initiate(options)

N/workflow Module

For a script sample, see N/workflow Module Script Sample.

nlapiInitiateWorkflowAsync(recordtype, id, workflowid, initialValues)

task.WorkflowTriggerTask

N/task Module

nlapiInsertLineItem(type, line)

Record.insertLine(options)

CurrentRecord.insertLine(options)

N/record Module

N/currentRecord Module

nlapiInsertLineItemOption(type, fldnam, value, text, selected)

Field.insertSelectOption(options)

N/currentRecord Module

nlapiInsertSelectOption(fldnam, value, text, selected)

Field.insertSelectOption(options)

N/currentRecord Module

nlapiIsLineItemChanged(type)

Sublist.isChanged

N/record Module

Note that isChanged is a property

                    record.getSublist("addressbook").isChanged 

                  

nlapiLoadConfiguration(type)

config.load(options)

N/config Module

For a script sample, see N/config Module Script Sample.

nlapiLoadFile(id)

file.load(options)

N/file Module

For a script sample, see N/file Module Script Samples.

nlapiLoadRecord(type, id, initializeValues)

record.load(options)

N/record Module

nlapiLoadSearch(type, id)

search.load(options)

N/search Module

For a script sample, see N/search Module Script Samples.

nlapiLogExecution(type, title, details)

log.audit(options)

log.debug(options)

log.emergency(options)

log.error(options)

N/log Module

For a script sample, see N/log Module Script Sample.

nlapiLookupField(type, id, fields, text)

search.lookupFields(options)

N/search Module

nlapiOutboundSSO(id)

sso.generateSuiteSignOnToken(options)

 

For a script sample, see N/sso Module Script Samples.

nlapiPrintRecord(type, id, mode, properties)

render.bom(options)

render.packingSlip(options)

render.pickingTicket(options)

render.statement(options)

render.transaction(options)

N/render Module

For a script sample, see N/render Module Script Samples.

nlapiRefreshLineItems(type)

This API does not have a SuiteScript 2.x equivalent.

nlapiRefreshPortlet()

portlet.refresh()

N/portlet Module

For a script sample, see N/portlet Module Script Sample

nlapiRemoveCurrentLineItemSubrecord(sublist, fldname)

Record.removeCurrentSublistSubrecord(options)

CurrentRecord.removeCurrentSublistSubrecord(options)

N/record Module

N/currentRecord Module

Note that scripting subrecords in SuiteScript 2.x is fundamentally different from scripting subrecords in SuiteScript 1.0. For additional information, see the SuiteScript 2.0 topics under SuiteScript 2.x Scripting Subrecords.

nlapiRemoveLineItem(type, line)

Record.removeLine(options)

CurrentRecord.removeLine(options)

N/record Module

N/currentRecord Module

nlapiRemoveLineItemOption(type, fldnam, value)

Field.removeSelectOption(options)

N/currentRecord Module

nlapiRemoveSelectOption(fldnam, value)

Field.removeSelectOption(options)

N/currentRecord Module

nlapiRemoveSubrecord(fldname)

Record.removeSubrecord(options)

CurrentRecord.removeSubrecord(options)

N/record Module

N/currentRecord Module

Note that scripting subrecords in SuiteScript 2.x is fundamentally different from scripting subrecords in SuiteScript 1.0. For additional information, see the SuiteScript 2.x topics under SuiteScript 2.x Scripting Subrecords.

nlapiRequestURL(url, postdata, headers, callback, httpMethod)

http.delete(options)

http.get(options)

http.post(options)

http.put(options)

http.request(options)

N/http Module

nlapiRequestURLWithCredentials(credentials, url, postdata, headers, httpMethod)

https.request(options)

N/https Module

Server scripts only

nlapiResizePortlet()

portlet.resize()

N/portlet Module

For a script sample, see N/portlet Module Script Sample

nlapiResolveURL(type, identifier, id, displayMode)

url.resolveRecord(options)

url.resolveScript(options)

url.resolveTaskLink(options)

N/url Module

For a script sample, see N/url Module Script Samples.

nlapiScheduleScript(scriptId, deployId, params)

task.create(options)

N/task Module

                    var scheduleScriptTaskObj = task.create({
    taskType: task.TaskType.SCHEDULED_SCRIPT,
    //Other Params
}); 

                  

nlapiSearchDuplicate(type, fields, id)

search.duplicates(options)

N/search Module

nlapiSearchGlobal(keywords)

search.global(options)

N/search Module

nlapiSearchRecord(type, id, filters, columns)

search.create(options)

search.load(options)

N/search Module

For a script sample, see N/search Module Script Samples.

nlapiSelectLineItem(type, linenum)

Record.selectLine(options)

CurrentRecord.selectLine(options)

N/record Module

N/currentRecord Module

SuiteScript 2.x begins sublist numbering with 0. SuiteScript 1.0 begins sublist numbering with 1.

nlapiSelectNewLineItem(type)

Record.selectNewLine(options)

CurrentRecord.selectNewLine(options)

N/record Module

N/currentRecord Module

nlapiSelectNode(node, xpath)

XPath.select(options)

N/xml Module

nlapiSelectNodes(node, xpath)

XPath.select(options)

N/xml Module

nlapiSelectValue(node, xpath)

See Notes

N/xml Module

To mimic this functionality in SuiteScript 2.x, select a node with XPath.select(options) and then inspect the Node.textContent property.

nlapiSelectValues(node, path)

See Notes

N/xml Module

To mimic this functionality in SuiteScript 2.x, select an array of nodes with XPath.select(options) and then loop through each node’s Node.textContent property.

nlapiSendCampaignEmail(campaigneventid, recipientid)

email.sendCampaignEvent(options)

N/email Module

nlapiSendEmail(author, recipient, subject, body, cc, bcc, records, attachments)

email.send(options)

email.sendBulk(options)

N/email Module

For a script sample, see N/email Module Script Sample.

nlapiSendFax(author, recipient, subject, body, records, attachments)

This API does not have a SuiteScript 2.x equivalent.

nlapiSetCurrentLineItemDateTimeValue(type, fieldId, dateTime, timeZone)

See Notes

N/format Module

Use the N/format module to mimic this functionality in SuiteScript 2.x.

nlapiSetCurrentLineItemMatrixValue(type, fldnam, column, value, firefieldchanged, synchronous)

Record.setCurrentMatrixSublistValue(options)

CurrentRecord.setCurrentMatrixSublistValue(options)

N/record Module

N/currentRecord Module

nlapiSetCurrentLineItemText(type, fldnam, text, firefieldchanged, synchronous)

Record.setCurrentSublistText(options)

CurrentRecord.setCurrentSublistText(options)

N/record Module

N/currentRecord Module

nlapiSetCurrentLineItemValue(type, fldnam, value, firefieldchanged, synchronous)

Record.setCurrentSublistValue(options)

CurrentRecord.setCurrentSublistValue(options)

N/record Module

N/currentRecord Module

nlapiSetCurrentLineItemValues(type, fldnam, values, firefieldchanged, synchronous)

Record.setCurrentSublistValue(options)

CurrentRecord.setCurrentSublistValue(options)

N/record Module

N/currentRecord Module

nlapiSetDateTimeValue(fieldId, dateTime, timeZone)

See Notes

N/format Module

Use the N/format module to mimic this functionality in SuiteScript 2.x.

nlapiSetFieldText(fldname, txt, firefieldchanged, synchronous)

Record.setText(options)

CurrentRecord.setText(options)

N/record Module

N/currentRecord Module

nlapiSetFieldTexts (fldname, txts, firefieldchanged, synchronous)

Record.setText(options)

CurrentRecord.setText(options)

N/record Module

N/currentRecord Module

nlapiSetFieldValue(fldnam, value, firefieldchanged, synchronous)

Record.setValue(options)

CurrentRecord.setValue(options)

N/record Module

N/currentRecord Module

nlapiSetFieldValues (fldnam, value, firefieldchanged, synchronous)

Record.setValue(options)

CurrentRecord.setValue(options)

N/record Module

N/currentRecord Module

nlapiSetLineItemDateTimeValue(type, fieldId, value, dateTime, timeZone)

See Notes

N/format Module

Use the N/format module to mimic this functionality in SuiteScript 2.x.

nlapiSetLineItemValue(type, fldnam, linenum, value)

Record.setSublistValue(options)

N/record Module

SuiteScript 2.x begins sublist numbering with 0. SuiteScript 1.0 begins sublist numbering with 1.

nlapiSetMatrixValue(type, fldnam, column, value, firefieldchanged, synchronous)

Record.setMatrixHeaderValue(options)

CurrentRecord.setMatrixHeaderValue(options)

N/record Module

N/currentRecord Module

nlapiSetRecoveryPoint()

See Notes

See Notes

The SuiteScript 2.x Map/Reduce Script Type automatically incorporates yielding.

nlapiSetRedirectURL(type, identifier, id, editmode, parameters)

redirect.redirect(options)

redirect.toRecord(options)

redirect.toSuitelet(options)

redirect.toTaskLink(options)

N/redirect Module

For a script sample, see N/redirect Module Script Sample.

nlapiStringToDate(str, format)

format.parse(options)

N/format Module

For a script sample, see N/format Module Script Samples.

nlapiStringToXML(text)

Parser.fromString(options)

N/xml Module

nlapiSubmitConfiguration(name)

Record.save(options)

N/record Module

nlapiSubmitCSVImport(nlobjCSVImport)

N/task Module

nlapiSubmitRecord(record, doSourcing, ignoreMandatoryFields)

Record.save(options)

N/record Module

nlapiSubmitField(type, id, fields, values, doSourcing)

record.submitFields(options)

N/record Module

nlapiSubmitFile(file)

File.save()

N/file Module

For a script sample, see N/file Module Script Samples.

nlapiTransformRecord(type, id, transformType, transformValues)

record.transform(options)

N/record Module

nlapiTriggerWorkflow(recordtype, id, workflowid, actionid, stateid)

workflow.trigger(options)

N/workflow Module

nlapiValidateXML(xmlDocument, schemaDocument, schemaFolderId)

xml.validate(options)

N/xml Module

nlapiViewCurrentLineItemSubrecord(sublist, fldname)

CurrentRecord.getCurrentSublistSubrecord(options)

Record.getCurrentSublistSubrecord(options)

N/record Module

N/currentRecord Module

Note that scripting subrecords in SuiteScript 2.x is fundamentally different from scripting subrecords in SuiteScript 1.0. For additional information, see the SuiteScript 2.x topics under SuiteScript 2.x Scripting Subrecords.

nlapiViewLineItemSubrecord(sublist, fldname, linenum)

Record.getSublistSubrecord(options)

N/record Module

Note that scripting subrecords in SuiteScript 2.x is fundamentally different from scripting subrecords in SuiteScript 1.0. For additional information, see the SuiteScript 2.x topics under SuiteScript 2.x Scripting Subrecords.

SuiteScript 2.x begins sublist numbering with 0. SuiteScript 1.0 begins sublist numbering with 1.

nlapiViewSubrecord(fldname)

Record.getSubrecord(options)

CurrentRecord.getSubrecord(options)

N/record Module

N/currentRecord Module

Note that scripting subrecords in SuiteScript 2.x is fundamentally different from scripting subrecords in SuiteScript 1.0. For additional information, see the SuiteScript 2.x topics under SuiteScript 2.x Scripting Subrecords.

nlapiVoidTransaction(transactionType, recordId)

transaction.void(options)

N/transaction Module

For a script sample, see N/transaction Module Script Sample

nlapiXMLToPDF(xmlstring)

render.xmlToPdf(options)

TemplateRenderer.renderAsPdf()

N/render Module

Note that TemplateRenderer.renderAsPdf() is equivalent to nlapiXMLToPDF(nlobjEmailMerger.renderToString()).

For a script sample, see N/render Module Script Samples.

nlapiXMLToString(xml)

Parser.toString(options)

N/xml Module

nlapiYieldScript()

See Notes

See Notes

Note that the SuiteScript 2.x Map/Reduce Script Type automatically incorporates yielding.

Related Topics

SuiteScript 1.0 to SuiteScript 2.x API Map
SuiteScript 1.0 to SuiteScript 2.x API Map – Objects (nlobj)

General Notices