Carel Vdmerwe
01/10/2025, 9:32 AMCeligo AI
01/10/2025, 9:32 AMAI generated answer (using internal Slack threads):It seems like you're encountering an error with the File Drag and Drop feature in NetSuite. This error typically occurs when you're trying to attach a file to a line item that hasn't been saved yet. In NetSuite, you need to save the line item first before you can attach any file to it. This is because the system needs to create a record for the line item in the database, and then it uses the ID of that record to associate the file with the correct line item. Here's an example of how you might do this:
javascript
var objRecord = record.create({type: 'salesorder'});
objRecord.setCurrentSublistValue({sublistId: 'item', fieldId: 'item', value: 123});
objRecord.commitLine({sublistId: 'item'});
In this example, record.create({type: 'salesorder'})
creates a new sales order, objRecord.setCurrentSublistValue({sublistId: 'item', fieldId: 'item', value: 123})
sets the item for the current line, and objRecord.commitLine({sublistId: 'item'})
saves the line item. After this, you should be able to attach a file to the line item without encountering the error.
If you're still having trouble, you might consider using a third-party solution like extendTech's extendFiles, which allows for drag and drop functionality and lets you use your own repository instead of the file cabinet.
******
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/10/2025, 9:32 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815554798
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814508617
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812314093
Celigo AI
01/10/2025, 9:32 AM