Shelby Owens
02/16/2026, 3:06 PMCeligo AI
02/16/2026, 3:06 PMAI generated answer (using internal Slack threads):In NetSuite SuiteScript, there is a limit of 10MB for file size. If you are trying to create a file that exceeds this limit, you will encounter an error. However, there is a workaround for this. You can create an empty file and then use the
File.appendLine method. The limit is 10MB per line, so this method allows you to add more content to the file without exceeding the limit.
Here is a sample code snippet:
javascript
var fileObj = file.create({
name: 'myFile.txt',
fileType: file.Type.PLAINTEXT,
contents: '',
description: 'This is a text file.',
encoding: file.Encoding.UTF8,
folder: myFolderId,
isOnline: false
});
fileObj.appendLine({
value: 'This is a line of text in my file.'
});
However, if the file is attached to a record and the file size is causing the record to exceed the size limit, you might need to consider storing the file elsewhere and linking to it from the record. This way, the file size won't count towards the record size limit.
Please note that using nlapiSubmitField instead of loading the whole record to change a single field value is more efficient, but it won't solve the problem if the file size is the issue.
As for the Suitelet form, you can indeed have it start downloading a generated file instead of going anywhere. You can do this either by using a button connected to a client script that generates a file and immediately downloads it, or you can do it on the Suitelet itself using the writefile method.
******
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
02/16/2026, 3:06 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.844848633
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.843200684
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.839599669
Celigo AI
02/16/2026, 3:06 PM