Nour
09/22/2025, 3:48 PMCeligo AI
09/22/2025, 3:48 PMAI generated answer (using internal Slack threads):To add item inventory detail in an invoice in SuiteScript NetSuite, you would need to work with subrecords. The inventory detail is a subrecord in NetSuite, and you can manipulate it using SuiteScript. Here is a general approach to add inventory detail: 1. First, you need to select the line item for which you want to add the inventory detail. You can do this using the
selectLine
method.
javascript
record.selectLine({
sublistId: 'item',
line: 0
});
2. Then, you can get the inventory detail subrecord using the getSubrecord
method.
javascript
var inventoryDetailSubrecord = record.getCurrentSublistSubrecord({
sublistId: 'item',
fieldId: 'inventorydetail'
});
3. Once you have the subrecord, you can add the inventory assignment using the insertLine
method.
javascript
inventoryDetailSubrecord.insertLine({
sublistId: 'inventoryassignment',
line: 0
});
4. Then, you can set the values for the inventory assignment.
javascript
inventoryDetailSubrecord.setSublistValue({
sublistId: 'inventoryassignment',
fieldId: 'issueinventorynumber',
line: 0,
value: 'your inventory number'
});
5. Finally, you can commit the line using the commitLine
method.
javascript
record.commitLine({
sublistId: 'item'
});
Please note that this is a general approach and you might need to adjust it according to your specific needs. Also, make sure that you have the necessary permissions to manipulate the inventory detail subrecord.
******
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
09/22/2025, 3:48 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.848754883
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831543
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830352843
Celigo AI
09/22/2025, 3:48 PM