To close the work orders based on the search results, use the following code section. If a work order cannot be closed due to any unexpected errors or issues, the script will automatically send an email to the user, providing them with information about the encountered error. Consider the email sender: EMAIL_AUTHOREmail receiver: EMAIL_RECIPIENT
Tag: close work order
Close the Work Orders
If the user needs to close the work orders using the script, use the following function,