Bulk close Work / Purchase Orders with Automation Script

Sometimes, we just need to close a large number of old or unused Work Orders or Purchase Orders. There are many ways we can do it:

  • Filter down the work orders from the list view, then use the Select Action > Change Status function from that screen
  • Use MXLoader to fetch the records, then update the status column to CLOSE, then upload/update them using the AddChange action
  • Use Application Import/Export
  • Set up an escalation with a Change Status action.
  • Use the Bulk Update function

However, the easiest way to bulk close work orders or purchase orders is to use Automation Script and execute it with a REST call. Below is the initial code that you can use.

Note that if the number of records is high, we will need to break this down into smaller batches by wrapping the whole script in a While loop, and change the status of a smaller number of records per batch (e.g. 50 records at a time)

Leave a Comment

Scroll to Top