Hello! Im having some trouble creating an item rec...
# suitescript
i
Hello! Im having some trouble creating an item receipt, im getting the error
Before you can create the Inventory Detail, please enter values for:Quantity - Error
but just to validate this, just before saving the record im looping again through the lines and getting its information and Im seeing that the line has its quantity set, there is a second line, but this one is not received, it doesnt have neither qty nor inventory detail, so the issue appears to be the first and only received line
b
what does the code look like
i
This would be what im doing. Practically Im doing three things: 1. Removing lines (unchecking the receive) 2. Removing the inventory from the lines that are going to be received 3. Adding the inventory data based on a custom record 4. Saving the IR This works for other receipts, apparently the issue is just when Im doing a partial one
b
far too many branches in that code, you need to share enough code to reproduce the problem
and i have no idea what the parts you didnt share are doing or what they are returning
from a quick glance at the, your inventoryassignment code, you probably want to be selecting the new line instead of inserting a new one, though presumably your code is failing before reaching that line
though you also did not share which line is causing the error