url.resolveRecord(options)

Method Description

Returns the URL to a NetSuite record.

Returns

string

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/url Module

Since

2015.1

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.isEditMode

boolean

required

If set to true, returns a URL for the record in Edit mode.

If set to false, returns a URL for the record in View mode

The default value is View.

2015.1

options.recordId

string | number

required

The record ID of the target record instance.

2015.1

options.recordType

string

required

The type of record. For example, ‘purchaseorder’.

2015.1

options.params

Object

optional

Object used to add parameters for a custom URL. For example, a query to a database or to a search engine.

2015.1

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/url Module Script Samples.

          //Add additional code 
...
var output = url.resolveRecord({
    recordType: 'salesorder',
    recordId: 6,
    isEditMode: true
});
...
//Add additional code 

        

Related Topics

General Notices