url.HostType

Note:

The content in this help topic pertains to SuiteScript 2.0.

Note:

JavaScript does not include an enumeration type. The SuiteScript 2.0 documentation uses the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. In this object, each key points to a read-only string value.

Enum Description

Holds the string values that describe a category of domain name. Use this enum to set the value of the hostType parameter of the url.resolveDomain(options) method.

Type

enum

Supported Script Types

Server and client scripts

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

Module

N/url Module

Since

2017.1

Values

Value

Description

Sample Result

APPLICATION

The domain for UI access.

<accountID>.app.netsuite.com

<accountID> is replaced with your NetSuite account number.

CUSTOMER_CENTER

The customer center.

<accountID>.app.netsuite.com

<accountID> is replaced with your NetSuite account number.

FORM

The domain for forms hosted online, usually in Suitelets.

<accountID>.extforms.netsuite.com

<accountID> is replaced with your NetSuite account number.

RESTLET

The domain for calling a RESTlet from an external source.

<accountID>.restlets.api.netsuite.com

<accountID> is replaced with your NetSuite account number.

SUITETALK

The domain for SOAP web services requests.

<accountID>.suitetalk.api.netsuite.com

<accountID> is replaced with your NetSuite account number.

For more information about NetSuite domains, see Understanding NetSuite URLs.

Warning:

The results returned, as shown in the sample results column, may change without notice. Because these values can change, your scripts must dynamically discover domain names. For more details, see Dynamic Discovery of URLs.

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.resolveDomain({
    hostType: url.HostType.APPLICATION,
    accountId: '012345'
});
...
//Add additional code 

          

Related Topics

N/url Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices