I have a beforeSubmit user event deployed to the E...
# suitescript
s
I have a beforeSubmit user event deployed to the Estimate record type. When a user clicks the "Sales Order" button to create an order from this Estimate, the status and probability fields are updated on the Estimate record, but the user event script doesn't fire. How can I get the user event script to fire on the Estimate record when this action happens?
s
@Steve at GrowGeneration What is the scenario you’re supporting? For example, I had this same problem with the Opportunity where the team didn’t want the opportunity status to change when the SO was created because there were fields that needed to be set by users when changed to Closed-Won… So, instead of fussing with user events, we just check the status when the SO is loaded with an Opportunity, and redirect users to the Opportunity to set it to CLOSED-WON before creating the Sales Order. (this is done with a client script, ui/dialog where their only option is to go to the OPP in Edit Mode) This way, we can enforce the validation on the record before the SO is created and then it won’t change stuff automatically.