This topic contains 5 replies, has 0 voices, and was last updated by david.smith 7 years, 6 months ago.

  • Author
    Posts
  • #1176

    darrenhillconsulting

    So,

    Pretty simple … I’m exporting some data and want to include a direct link back to the record that is exported.

    Fair enough … I use the url.ResolveRecord that returns me the ‘relative’ path to that record. I need the fully qualified link …

    Any suggestions how I get my ‘current’ netsuite domain? ie. system.sandbox.netsuite.com, system.na1.netsuite.com, etc

    I’m in a RESTlet.

    My thoughts

    – look at the Customer Centre Login URL in the Company Information (but what if they don’t have Company Information?

    – make a custom Company Preference (but this seems overkill)

    Thoughts anyone?
    This is a cached copy. Click here to see the original post.

  • #1177

    erictgrubaugh

    If this is 2.0, then in 2017.1 there is a change coming where `N/url` gets a `resolveDomain` method; details are in the release notes. In 1.0, you will still need to use the REST Roles Service.

  • #1178

    darrenhillconsulting

    Ooof … I should really start reading the release notes more closely. Thanks Eric.

  • #1179

    david.smith

    What Eric said. I’ve also done this via suitelet instead of the rest role service. A simple call to the suitelet will return back the domain being used by the account your currently in. Let me know if you want more info on this.

  • #1180

    elie

    How can we do this in 1.0 safely – ie an older script that needs to be updated to remove references to domains… I would like to incorporate this somehow into that 1.0 script. Should I be feeding the info into the UE script via a client side 2.0 script that calls url.resolveDomain? Thoughts?

  • #1181

    david.smith

    Client side scripts I will just use JavaScript if I’m on the page, such as a suitelet posting back to itself.

    Code:
    location.href
    If you need to lookup a record or suitelet url by way of the scriptid use the N/url module (SS2.x) or the nlapiResolveURL(SS1.0).

    https://netsuite.custhelp.com/app/an…703/kw/n%2Furl

    On a User Event you can get the request in the beforeload function (SS1.0).

    https://netsuite.custhelp.com/app/an…load/related/1

You must be logged in to reply to this topic.