
▲ 1 r/Netsuite
User Event Script for Auto-populating Inventory Detail in Item Receipt
Hi guys! I need your input please. Here's the scenario:
- Purchase Order has Lot Numbered Inventory items.
- I click "Receive" in the PO.
- The Item Receipt form is loaded on Edit.
- The User Event needs to do 2 things:
- Auto-populate the "Lot Number" field of the items in the line level of Item Receipt (beforeLoad - this works)
- Auto-populate the "Serial/Lot Number" and "Quantity" in the Inventory Detail (beforeSubmit/afterSubmit - the script doesn't get to this entry point).
Observations:
- When trying to save the Item Receipt, a pop-up shows "Please configure the inventory detail in line 1 of the item list."
- My guess is, the UE script doesn't trigger the beforeSubmit/afterSubmit because it's being blocked by the client-side validation of the form requiring the Inventory Details to be populated before saving the record.
- However, the logic for auto-populating the Inventory Detail fields are in the beforeSubmit/afterSubmit so I believe it's contradicting.
Notes:
- The solution was designed by a different person. I'm just developing/implementing it.
- I know this is feasible with the UE script but I'm not sure if it's applicable to the current use case.
Any thoughts on this please? How do you think I can proceed with this? Thank you in advance for your response.
u/GiveMeMyMan — 8 days ago