If I need to update the status of some sub work orders to cancel, do I need to call the changeStatus method and set the PARANTCHGSSTATUS field to false
------------------------------
Ethan Williams
secrecy
------------------------------
Original Message:
Sent: 07-07-2025 12:59
From: Steven Shull
Subject: Using the changeStatus method of workorder to batch cancel work orders may result in some data being unable to change its status
I know this is just a snippet of the overall code but be aware that canChangeStatus throws an exception when it's not allowed. Since you're not catching the exception, you'll stop the code if a status change on one of the records is not allowed.
Also, there is a bug on some versions (including 7.6.1.3) where changing the status to CAN fails on some work orders due to Known Issue: DT434796
You should also be calling save via the data bean (IE this.save()) rather than getting and saving the set. There's some additional handling in the framework in the data bean that you likely don't want to bypass.
------------------------------
Steven Shull
Naviam
------------------------------