Anyone ever attempted to automate an inventory adj...
# suitescript
c
Anyone ever attempted to automate an inventory adjustment when adding items to an invoice that have no inventory on hand? Any suggestions on the best approach? Through the validateLine entry point, I played with using the inventory detail subrecord to determine if an adjustment was necessary, but I'm getting a "Timeout: the record doesn't exist anymore" error. I assume i'm doing things out of order there.
b
the approach sounds too slow
netsuite has already determined that there is no inventory, creating an inventory adjustment afterwards means you have to retrigger netsuite's logic to calculate inventory
c
yeah, doing it after each line seems messy. I'd prefer to do it on beforeSubmit or saveRecord but netsuite blocks the ability to add a line without inventory detail. I just found an abandoned script from our previous consultant trying to workaround the same issue. designate a non-inventory placeholder item and put the intended item code in the description. Once the records saved it would do the inventory adjustments, then replace the lines on the invoice with the correct items.