Ron
01/16/2025, 8:51 PMCeligo AI
01/16/2025, 8:51 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you are trying to make multiple calls to a Suitelet without loading the record each time. Here are some insights from the threads: 1. You can indeed call a Suitelet to create a record and pass the ID to the main Suitelet. However, if you're encountering an error on the
record.save()
line, it's recommended to debug your code and ensure that all the field values are correct.
2. If you're trying to run multiple instances of a Suitelet one by one, you might face issues with redirection or login screens. One of the users tried to load the Suitelet in a window and close it once it's processed, but this approach seemed to fail.
3. The user's code was opening the Suitelet in the same tab due to using the same target for window.open
. Changing the name of the window or tab might help, but it didn't work in this user's case.
Here's a sample of the code they used:
javascript
for (var i = 0; i < lineCount; i++) {
var internalId = record.getSublistValue({
sublistId: 'custpage_table',
fieldId: 'internalid',
line: i
});
var url = `<https://1111111-sb1.app.netsuite.com/app/site/hosting/scriptlet.nl?script=579&deploy=1&compid=1111111_SB1&compid=1111111_SB1&packageSource=3¶ms1=1084267&id=1084267&internalId=${internalId}&whence=>`
urlArr.push(url)
}
urlArr.forEach((result)=> {
var win = window.open(result, 'chromeWindow', 'ASN Popup');
setTimeout(() => win.close(), 2000);
})
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
01/16/2025, 8:51 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.837003827
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826456606
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821753144
Celigo AI
01/16/2025, 8:51 PM