Katie V
08/26/2024, 9:51 PMCeligo AI
08/26/2024, 9:52 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems that the error "You have entered an Invalid Field Value 11867 for the following field: binnumber" is likely due to the bin not being available at the location where the user is trying to create the transfer. Here are a few things you can do to get around this error: 1. Ensure the bin is available at the location: Before creating the transfer, you can check if the bin is available at the location where the user is logged in. If it's not, you can either choose a different bin that is available at that location or make the bin available at that location. 2. Set the location on the record: When creating the transfer, make sure to set the 'location' and 'to location' on the record. This will ensure that the transfer is associated with the correct locations. 3. Check the item's association with the bin: Make sure that the item you're trying to transfer is still associated with the bin. You can check this on the item record. 4. Handle negative inventory balances: If there's a negative inventory balance for the item in the bin, this could also cause issues. You might need to handle this case in your script. Here's a sample code snippet based on the conversations:
javascript
rec.selectNewLine('inventory');
rec.setCurrentSublistValue('inventory', 'item', obj.itemId);
rec.setCurrentSublistValue('inventory', 'adjustqtyby', obj.selectedQty);
let invDet = rec.getCurrentSublistSubrecord('inventory', 'inventorydetail');
invDet.selectNewLine('inventoryassignment');
invDet.setCurrentSublistValue('inventoryassignment', 'issueinventorynumber', obj.lotId);
if (obj.selectedBin) {
invDet.setCurrentSublistValue('inventoryassignment', 'tobinnumber', obj.selectedBin.value);
}
invDet.setCurrentSublistValue('inventoryassignment', 'quantity', obj.selectedQty);
invDet.commitLine('inventoryassignment');
rec.commitLine('inventory');
let invTranId = rec.save();
******
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
08/26/2024, 9:52 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836789608
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832790434
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831921339
Celigo AI
08/26/2024, 9:52 PM