javascript - Get authorized url of NetSuite -


i need access sales order in netsuite sfdc login. have code gets sales order number. problem need generate url redirect sales order in netsuite sales force. requires url ' https://system.na1.netsuite.com' via suitescript . 'na1' in url stands noth america , changes in url according country. hence passing email id, password actual login address 'https://system.netsuite.com/pages/customerlogin.jsp' need authorized url. nlapiresolveurl(type, identifier, id, displaymode) creates url on-the-fly later part of url.

any idea or solution please?

expanding on answer posted @egrubaugh360, base domain, here example.

function credentials(){         this.email = "netsuiteemail@example.com";         this.account = "1234567";         this.role = "25";         this.password = "secretpassword";     }      //setting url                   var url = "https://rest.netsuite.com/rest/roles";      //calling credential function     var cred = new credentials();      //setting headers      var headers = {"user-agent-x": "suitescript-call",                    "authorization": "nlauth nlauth_account=" + cred.account + ", nlauth_email=" + cred.email +                                      ", nlauth_signature= " + cred.password + ", nlauth_role=" + cred.role,                    "content-type": "application/json"};      var response = nlapirequesturl(url, null, headers);     var results = json.parse(response.body);     var domain = results[0].datacenterurls.systemdomain; 

in addition, instead of systemdomain, restdomain, , webservicesdomain available. example of calling restlet netsuite, can done in language.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -