Re-generate stale Agreement Work Orders

Photo by Ketut Subiyanto on Pexels.com

Auto-generating Work Orders and (optionally) Bookings for assets servicing, scheduled maintenance or any other recurring work order scenarios is a common requirement in any Field Service organisation. This is one of the core features of Dynamics 365 Field Service and is supported through ‘Agreements’. Generally, Agreements are created for a substantially long time (6 months, year or more) and Work Orders & Bookings are then automatically generated by the system in pre-configured frequencies (daily, weekly, fortnightly etc.) during the Agreement term. Generated Work Orders derive their features (duration, Work Order Products, Service Tasks etc.) from Incident Type.

What happens though when any of these details change in Incident Type? A typical example is a certain electrical motor needs maintenance every 2 weeks and it takes 2 hours to do a normal servicing. However, after a break-fix, a new part is added to the motor, which sends live telemetry data to cloud and therefore:

a) inspection time reduces from 2 hours to an hour only, and/or
b) inspection is now required only once per month, and/or
c) maintenance steps have changed (change in Service Tasks)

Now you can make these change in Incident Type and Agreement Booking Incident records, but what about Work Orders that are already generated against Agreements by the system? Well, they are left stale because the change in Incident Type or Agreement Booking Incident will not be reflected in them. Often in such cases, you may not want to manually edit considering perhaps the volume of assets you are servicing (a large number of Work Orders).

Surprisingly, this complex problem has an easy solution.

The stage

In my test environment, I’ve got an Agreement setup with one Booking Setup. Following Booking Date records are generated for Work Orders to generate every fortnight on Monday.

If I now go into Booking Recurrence and change the frequency to once a month:

This will not result in re-generating Agreement Booking Dates and Work Order records. The Work Orders are naturally stale now as the frequency is incorrect.

The action

The solution to this problem is to go to an Agreement record. Change the status to Estimate, save the record..

Then go to Agreement Booking Date (under Agreement Booking Setup) and delete all the records.

Note: You would probably like to re-generate only those Work Orders that are not scheduled yet, so delete Agreement Booking Date records with the status of ‘Active’ or only those ‘Processed’ records with Work Order in ‘Open – Unscheduled’ status. Deactivate those Work Orders too (clue: Advanced Find).

Next, go to an Agreement record and change the status back to Active. Save the record

Go back to Agreement Booking Dates and you’ll notice all previous Agreement Booking Date and associated Work Order records are deleted and being re-created. Soon enough, new Work Order records will also be re-generated with the new frequency:

This same mechanism also works for re-generating Work Order against updates in Incident Type, Assets or any other related records.

….and yes, the solution works but is very similar to:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.