Fix NetSuite File Cabinet Storage Limit Issues
NetSuite File Cabinet storage fills faster than expected as attachments compound. Move files out of the cabinet while keeping them accessible from records.

On this page
NetSuite file cabinet storage fills up faster than most clients expect. The 100MB per-file recommendation sounds generous until transaction attachments, signed PDFs, and vendor documents compound across multiple subsidiaries. When the account exceeds its service tier file storage limit, administrators see a banner message and receive an email notification. By the time clients notice, cleanup becomes an urgent IT chore.
The core problem is structural: document volume keeps growing while the allowance stays fixed. Manual archiving fails because nobody maintains it. Asking users to store fewer files works for about two weeks. Duplicate cleanup buys time but the cabinet refills. The lasting fix is moving file storage out of the File Cabinet entirely while keeping documents accessible from NetSuite records.
What Counts Against File Cabinet Storage
Before choosing a strategy, understand what consumes space. Every file stored in the File Cabinet counts toward your service tier limit, including:
- Transaction attachments (vendor bills, customer invoices, purchase orders)
- Email attachments received through NetSuite's inbound email handling
- SuiteScript-generated PDFs and CSV exports
- Uploaded images, logos, and marketing assets
- Imported documents from SuiteTalk or REST web services
NetSuite recommends a maximum file size of 100MB per file. Inbound email attachments cap at 10MB. These limits protect performance, but they don't solve the accumulation problem. Note that the 10MB inbound limit is separate from the 15MB outbound email limit, which covers both message content and attachments.
Option 1: Automated Archiving with SuiteScript
The most direct approach is scheduling a script that identifies old files, exports them, and removes them from the File Cabinet. This works when clients genuinely need documents retained but don't need them live in NetSuite.
Here's a SuiteScript 2.1 scheduled script that archives files older than a configurable threshold:
/**
* @NApiVersion 2.1
* @NScriptType ScheduledScript
*/
define(['N/search', 'N/record', 'N/file', 'N/log'], (search, record, file, log) => {
const ARCHIVE_DAYS = 365; // Archive files older than 1 year
const ARCHIVE_FOLDER_ID = 1234; // Target folder for archived files
const execute = (context) => {
const fileSearch = search.create({
type: search.Type.FILE,
filters: [
['availablewithoutlogin', 'is', 'F'],
'and',
['modified', 'before', `daysago${ARCHIVE_DAYS}`]
],
columns: ['internalid', 'name', 'folder', 'size']
});
let archivedCount = 0;
const batchSize = 1000;
fileSearch.run().each((result) => {
try {
const fileId = result.getValue({ name: 'internalid' });
const fileName = result.getValue({ name: 'name' });
// Move file to archive folder
record.submitFields({
type: record.Type.FILE,
id: fileId,
values: { folder: ARCHIVE_FOLDER_ID },
options: { enableSourcing: false, ignoreMandatoryFields: true }
});
archivedCount++;
if (archivedCount >= batchSize) {
return false; // Stop processing, next run picks up remaining
}
} catch (e) {
log.error({
title: 'Archive Failed',
details: `File ${result.getValue({ name: 'internalid' })}: ${e.message}`
});
}
return true;
});
log.audit({
title: 'Archive Complete',
details: `Archived ${archivedCount} files`
});
};
return { execute };
});Deployment steps:
- Go to Customization > Scripting > Scripts > New
- Select Scheduled Script as the script type
- Paste the code and save
- Deploy via Customization > Scripting > Script Deployments > New
- Set the schedule to run monthly or quarterly
- Test with a single folder first before running account-wide
This script moves files to an archive folder rather than deleting them. You can extend it to export files to a zip and push them to external storage before removal. The record.Type.FILE constant maps to the file record type, and the N/file module handles all file operations in SuiteScript 2.1.
Option 2: External Storage with Record Links
The approach that works best for document-heavy clients is keeping files outside NetSuite and storing only the link on the record. Most clients already pay for Microsoft 365, Google Workspace, or Box, so external storage adds no new cost.
SharePoint integration pattern:
- Create a SharePoint document library for each subsidiary or department
- Build a Suitelet or client script that uploads files to SharePoint via Microsoft Graph API
- Store the SharePoint file URL in a custom field on the NetSuite record
- Add a custom button or link that opens the external document from the record
This is where most integrations break: the handshake between NetSuite and SharePoint requires OAuth 2.0 with the Microsoft identity platform. You'll need to register an app in Azure AD, grant the Files.ReadWrite.All permission, and handle token refresh.
The source of truth becomes SharePoint. NetSuite holds the pointer, not the data. Transaction attachments stop consuming File Cabinet storage entirely.
Option 3: Hybrid Approach for Transaction Attachments
Some files must stay in the File Cabinet. Vendor bills processed through Bill Capture and customer invoice exhibits generated by custom scripts often require native attachments. For these, apply selective rules:
- Keep only the most recent 12 months of transaction attachments in NetSuite
- Archive older attachments to external storage quarterly
- Store the archived file URL in a custom field on the transaction record
This hybrid model preserves integration functionality while stopping the uncontrolled growth.
What Actually Happens When You Exceed the Limit
NetSuite doesn't shut down your account when you exceed file storage. Administrators see a banner message and receive an email notification. But the consequences compound:
- Performance degrades as the File Cabinet grows
- Backups and restores take longer
- New uploads may fail if the account hits hard limits
- SuiteScript governance limits apply to file operations, so batch processing large archives can hit script timeouts
The error response tells you exactly what went wrong when uploads fail. Check the INVALID_FILE or STORAGE_LIMIT_EXCEEDED error codes in the response body.
Setting Up a Sustainable Storage Policy
Here's the validation step for any storage strategy:
Step 1: Audit current usage. Run a saved search on files grouped by folder and size to identify the biggest consumers.
Step 2: Classify documents. Transactions that require audit trails stay in NetSuite. Reference documents, drawings, datasheets, and signed contracts move external.
Step 3: Automate the migration. Script the export and purge on a schedule. Quarterly cadence works better than annual because the cabinet never gets overwhelming.
Step 4: Verify links work. After migration, spot-check records to confirm the external URLs resolve correctly.
Step 5: Monitor growth. Set a saved search alert when the File Cabinet reaches 80% of your service tier limit.
When to Consider a Third-Party Solution
Some clients need more than scripting provides. eXtendFiles by eXtendTech integrates with Box and Microsoft 365. SkyDoc moves file storage out of the File Cabinet entirely. These tools handle the integration logic, retry handling, and user interface so you don't maintain custom code.
The tradeoff is cost and another vendor relationship. For clients with fewer than 500 documents per month, a scheduled script plus SharePoint usually suffices. For manufacturing clients with thousands of drawings and datasheets, a commercial connector pays for itself in saved engineering time.
Test this with a single record first. Pick one vendor with heavy attachments, migrate their documents, and confirm the workflow before rolling out across the account. The cleanup becomes permanent only when the process is automated and the external links are reliable. For the full breakdown of service tier limits and the 90-day grace period for File Cabinet storage, review the Account Setup Guide. If you're new to how File Cabinet folders and file records work, the NetSuite Basics Guide covers the fundamentals.


