Hi there, (maybe dumb) leading practice question. ...
# suitescript
n
Hi there, (maybe dumb) leading practice question. I have a small automation project around Work Order (WO), Work Order Issue (WOI) & Work Order Completion (WOC). I need a UE script to trigger before saving the WO to update the WO, but also before saving the WOI to update the WO and before saving the WOC to update the WO. WOI and WOC are related records of WO. Is it better to create 3 UE, 1 per record type (and deployment per record type), or 1 UE wih IF Statement according to the record type (with one deployment for all record types)? Thanks 🙂
b
depends on the differences in logic
if you do the same thing to the wo for all 3 records, then you can probably do the same script record
n
At the end of the day, just the WO will be updated. So you are comforting my idea with the unique script ;)
b
the same script record makes it easier to do things like inactivate all of them at the same time
or share script parameters
or logs all in the same place
basically all things that only really make sense if they are the same
n
Thanks @battk 😉