We have a mandatory custom transaction line field ...
# suitescript
l
We have a mandatory custom transaction line field in Inventory Adjustments. We also have a third-party app that auto-creates an Inventory Adjustment via map reduce script. It errors out because the custom field is not being populated and it's not available on their Suitelet, so users can't manually set the value. Now we tried to create a UE script that sets the value of the mandatory field before record submit. But that's not working either. Is it because in the UI NS imposes the mandatory flag requirement first before the script gets triggered? Mimicking UI behavior? Is the solution then to make it option before record load and set value before record submit?
s
Check your execution contexts on the beforeSubmit script.
alternatively make the field non-mandatory and add a client side lineValidation function to check the field has been populated in the UI