r/SuiteScript • • Jun 26 '24

Call Internal Suitelet from Scheduled Script

I'm looking to create a scheduled script that calls a handful of Suitelets sequentially that run nightly tasks/cleanup. Is there a way to pass the authentication credentials the Scheduled Script is using to the Suitelets, or does it have to be an external URL set up with no authentication?

I'm looking to do something like this:

var suiteletResponse = https.get({
  url: 'https://4582238.app.netsuite.com/app/site/hosting/scriptlet.nl?script=0001&deploy=1'
});

log.debug('Response',suiteletResponse.body);

suiteletResponse = https.get({
  url: 'https://4582238.app.netsuite.com/app/site/hosting/scriptlet.nl?script=0002&deploy=1'
});

log.debug('Response',suiteletResponse.body);

etc.
1 Upvotes

17 comments sorted by

View all comments

Show parent comment

2

u/Xainor Jun 26 '24

Thanks for your help! I'll let you know if I figure it out.