Nikola Gavric
04/29/2021, 11:21 AMRyan J
04/29/2021, 11:24 AMDominic B
04/29/2021, 1:37 PMbattk
04/29/2021, 2:19 PMbattk
04/29/2021, 2:22 PMNikola Gavric
04/29/2021, 5:39 PMNikola Gavric
05/03/2021, 9:37 PMbattk
05/03/2021, 9:46 PMNikola Gavric
05/03/2021, 9:59 PMconst suiteLetUrl = url.resolveScript({
scriptId: 'customscript_***_sl',
deploymentId: 'customdeploy_***_sl',
returnExternalUrl: false
});
var headerObj = {
name: 'Content-Type',
value: 'application/json'
};
return <http://https.post|https.post>({
url: suiteLetUrl,
body: {
action: 'getCustomerCases'
},
headers: headerObj
}).body;
Suitelet:
var url = '<restlet url>';
var method = 'GET';
var headers = oauth.getHeaders({
url: url,
method: method,
tokenKey: secret.token.public,
tokenSecret: secret.token.secret
});
headers['Content-Type'] = 'application/json';
return https.get({
url: url,
headers: headers
}).body;
Nikola Gavric
05/03/2021, 10:05 PMbattk
05/03/2021, 10:21 PMNikola Gavric
05/04/2021, 3:34 PMNikola Gavric
05/04/2021, 4:00 PM{
name: 'Content-Type',
value: 'application/json'
}
Header from the call that the CS makes to the SL.. I’m not sure it’s resolved as it didn’t have a super clear pattern, sometimes it takes some time to show, but it’s take longer now than before and still don’t get it so hopefully that was it.. any ideas as to why that would create the problem? Anyways I’m just glad it seems to be working 🙂battk
05/04/2021, 6:37 PMNikola Gavric
05/04/2021, 6:54 PMNikola Gavric
05/04/2021, 8:21 PM<HTML><HEAD><BASE href='https://*****.app.netsuite.com/'><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></HEAD><BODY style=\"font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10pt;\"></BODY></HTML>
This was of course then trying to load as HTML in my Suitelet because this is part of the data I added to the HTML body of the Suitelet with my Client script, so it then tried to call the URL which, to confuse me even more is the same domain as the RL I got the data from. Happy days! Well now I know what the issue was, thanks for helping out, appreciate it!