erictgrubaugh
02/02/2017, 7:24 PMIn previous releases, NetSuite offered The REST roles Service for retrieving domain data. SuiteScript 1.0 scripts must still use The REST roles Service to dynamically generate domain names. However, SuiteScript 2.0 scripts should use the new method, resolveDomain(), which is part of the N/url Module. The url.resolveDomain() method has one mandatory parameter, hostType, which identifies the type of domain you want to retrieve. You populate this parameter by using the url.HostType enumeration. An optional parameter, accountId, identifies the NetSuite account for which you want to retrieve data. If no account is specified, the system retrieves data for the account that is running the script.