Looking to modify the Inventory Detail from the Cl...
# suitescript
r
Looking to modify the Inventory Detail from the Client Script during Item Fulfillment. I know this cannot be done directly, so looking to figure out what to pass to the SuiteLet in order to do this. I've tried to use the currentRecord Id, but that is null. I've tried to get the inventory detail, but I get an block stating it cannot be modified (client script). I'm going to try the user event script beforeSubmit.
b
suitelet or user event is basically only a choice if you only need to support edit and not create
r
I'm trying to add inventory detail. Do I need to "create" this in the SuiteLet and if so, I'm trying to find the way to link this to my Client Script current record.
Seems I'm having trouble getting the source record ID, the fulfillment record 'itemfulfillment' in this case.
I've got the sales order now from the item fulfillment. The next question is the serial number. It seems I cannot just use the human readable string we have, it wants the ID of the serial number. What is the effective lookup for this?
b
item search that uses inventory number join
or an inventory number search
👀 1
there are also query equivalents
r
Thanks for this help. The new issue now is the SO is updated with the inventory detail as executed from the Item Fulfillment. However, the item fulfillment record doesn't have the inventory detail. My goal was to have someone manually fulfilling an order where we get a lookup to get multiple serial numbers that then populate the inventory detail. Wish Client Script could do this. Seems the current record doesn't exist as it's being worked on.
b
inventory details on the sales order would only get to the item fulfillment if you create a new fulfillment
r
using location.reload() does work, but to get the quantity in the inventorydetails is a my next challenge to avoid the pop-up about adding inventory detail to a line that doesn't have it