irurzo
04/29/2022, 1:57 PMvar suiteletURL = url.resolveScript({
scriptId: 'scriptId',
deploymentId: 'deployId'
});
var response = <http://https.post|https.post>({
url:suiteletURL,
body: params
});
This returned an invalid URL, then I added to the URL -> url: 'https://' + domain + suiteletURL
where domain is
url.resolveDomain({ hostType: url.HostType.APPLICATION });
But this returned on the response a 500 error, then I tried with redirect.toSuitelet()
but this apparently didnt do nothing. Any ideaSciuridae54696d
04/29/2022, 2:37 PMAs an alternate solution , we can create a SuiteLet script that can trigger another Suitelet.
Here is a code snippet used in creating a SuiteLet that would trigger another Suitelet:
function onRequest(context) {
var parameters='';
var suiteletURL = url.resolveScript({
scriptId:'customscript148', // Script id of the script that will be triggered
deploymentId: 'customdeploy1',
returnExternalUrl: true
});
log.debug('suiteletURL', suiteletURL)
var response1 = <http://https.post|https.post>({ //Sends and http post request
url: suiteletURL,
body: parameters
});
}
return {
onRequest: onRequest
};
That's probably what you need to do, I'd try it with the returnExternalUrl as trueirurzo
04/29/2022, 2:56 PMShawn Talbert
04/29/2022, 3:17 PMSandii
04/29/2022, 4:38 PMirurzo
04/29/2022, 4:43 PMShawn Talbert
04/29/2022, 4:44 PMirurzo
04/29/2022, 4:44 PMShawn Talbert
04/29/2022, 4:46 PM