This topic contains 5 replies, has 0 voices, and was last updated by david.smith 7 years, 6 months ago.
-
AuthorPosts
-
February 10, 2017 at 3:43 pm #1176
darrenhillconsultingSo,
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. -
February 10, 2017 at 4:58 pm #1177
erictgrubaughIf 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.
-
February 11, 2017 at 3:52 pm #1178
darrenhillconsultingOoof … I should really start reading the release notes more closely. Thanks Eric.
-
February 14, 2017 at 9:22 am #1179
david.smithWhat 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.
-
May 22, 2017 at 11:02 pm #1180
elieHow 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?
-
May 23, 2017 at 4:44 pm #1181
david.smithClient 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
-
AuthorPosts
You must be logged in to reply to this topic.