Nour Khaled
04/14/2025, 9:01 PMCeligo AI
04/14/2025, 9:01 PMAI generated answer (using internal Slack threads):To configure an inventory detail for each item line on a custom record, you need to create a subrecord for the inventory detail. Here is an example of how you can do this in SuiteScript:
javascript
var sublistLine = customRecord.selectNewLineItem('sublistId');
customRecord.setCurrentSublistValue('sublistId', 'item', itemId);
var inventoryDetailSubrecord = customRecord.createCurrentSublistSubrecord('sublistId', 'inventorydetail');
inventoryDetailSubrecord.selectNewLineItem('inventoryassignment');
inventoryDetailSubrecord.setCurrentSublistValue('inventoryassignment', 'binnumber', binNumber);
inventoryDetailSubrecord.setCurrentSublistValue('inventoryassignment', 'quantity', quantity);
inventoryDetailSubrecord.commitLineItem('inventoryassignment');
inventoryDetailSubrecord.commit();
customRecord.commitLineItem('sublistId');
In this example, sublistId
is the ID of your sublist, itemId
is the ID of the item you want to add, binNumber
is the bin number for the inventory detail, and quantity
is the quantity for the inventory detail.
Please note that you need to replace 'sublistId', 'itemId', 'binNumber', and 'quantity' with your actual values. Also, make sure that the 'inventorydetail' field is present on your sublist and that it is of type '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
04/14/2025, 9:01 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.858124197
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.856255352
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.848170221
Celigo AI
04/14/2025, 9:01 PM