u/GiveMeMyMan

User Event Script for Auto-populating Inventory Detail in Item Receipt

User Event Script for Auto-populating Inventory Detail in Item Receipt

Hi guys! I need your input please. Here's the scenario:

  1. Purchase Order has Lot Numbered Inventory items.
  2. I click "Receive" in the PO.
  3. The Item Receipt form is loaded on Edit.
  4. The User Event needs to do 2 things:
    1. Auto-populate the "Lot Number" field of the items in the line level of Item Receipt (beforeLoad - this works)
    2. Auto-populate the "Serial/Lot Number" and "Quantity" in the Inventory Detail (beforeSubmit/afterSubmit - the script doesn't get to this entry point).

https://preview.redd.it/0sutdoyex41h1.png?width=679&format=png&auto=webp&s=49e7bec226c433dc8588f3db718bfc1e9e310df9

Observations:

  • When trying to save the Item Receipt, a pop-up shows "Please configure the inventory detail in line 1 of the item list."

https://preview.redd.it/kget7cinx41h1.png?width=441&format=png&auto=webp&s=50fcd583ecc064744807896f8e4cff5e403af48b

  • 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.

reddit.com
u/GiveMeMyMan — 8 days ago