Mike Casey
05/30/2025, 9:17 PMCeligo AI
05/30/2025, 9:17 PMAI generated answer (using internal Slack threads):To set the inventory details on an item on a transaction, you need to update the following fields, sublists, and subrecords: 1. Sublist 'inventory': This sublist contains the inventory items on the transaction. 2. Field 'inventorydetail': This field is a subrecord that contains the inventory detail for the item. You can access it using the
getSublistSubrecord
method.
3. Sublist 'inventoryassignment': This sublist is part of the 'inventorydetail' subrecord. It contains the inventory assignments for the item.
4. Field 'issueinventorynumber': This field is part of the 'inventoryassignment' sublist. It contains the internal ID of the inventory number (lot number or serial number) for the item. You can set it using the setSublistValue
method.
5. Field 'quantity': This field is also part of the 'inventoryassignment' sublist. It contains the quantity of the item. You can set it using the setSublistValue
method.
Here is a sample code snippet:
javascript
//Set Detail Box
var inventoryDetailRecord = to.getSublistSubrecord({
sublistId: 'inventory',
fieldId: 'inventorydetail',
line: i
});
inventoryDetailRecord.setSublistValue({
sublistId: 'inventoryassignment',
fieldId: 'issueinventorynumber',
value: result.getValue({
name: "internalid",
join: "inventoryNumber"
}),
line: i
});
inventoryDetailRecord.setSublistValue({
sublistId: 'inventoryassignment',
fieldId: 'quantity',
value: qty,
line: i
});
//End Detail Box
******
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
05/30/2025, 9:17 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.853343844
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.851620078
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.849557817
Celigo AI
05/30/2025, 9:18 PM