If your Microsoft Dynamics 365 environment contains the Field Service solution, even if you don’t use it, you may come across an issue that a customer recently brought to our attention.  It’s the dreaded “Service-Maintenance Based Records” issue. This will manifest itself on the Opportunity entity, and is part of the Field Service module.  If your environment does not contain Field Service, you will most likely not have this issue, but many Microsoft Dynamics 365 instances will have this module, and therefore it would not be rare if you ran into it.

If you do, you will sometimes find yourself faced with an Opportunity record that uses the form “Opportunity: Field Service Information” and is therefore made read-only.

Below is an example of such an error on the Unified Interface:
Service Maintenance Record

The slightly maddening thing about this error is that since the record is read-only, you cannot change the form for the record. So if you have customized the Opportunity form, and you are stuck with the default Field Service form, you cannot manage the information that you find important on the Opportunity record.  And when this manifests itself, it appears to happen randomly to certain Opportunity records, and not others.

Steps to Take, and a Workaround

Because a customer raised this issue with Microsoft, we have the benefit of their suggestions.  Even though these suggestions did not solve the problem (we have come up with a workaround shown below), they are not bad things to do.

Upgrade the Field Service Version if it’s out-dated. To check the version, follow these steps:

  1. Login to the Administration Portal. Be sure to log in with Office 365 administrator credentials.
  2.  Click the “Admin” icon.
  3. In “Admin Centers” scroll down to “Dynamics 365” and click that icon.
  4. Choose your Production environment and click “Solutions” to see the list of Solutions installed.
  5. Click on the Field Service solution. If the solution is out of date, you will see “Upgrade Available” under the STATUS column for Field Service. On the right, it will show you what version is available (i.e. “New version:”)
  6. Click the “Upgrade” button.

This is a good idea, but it does not solve existing Opportunity records, which will have the Catch-22 issue mentioned above, where you cannot change the form on the record because it is read-only.

The Issue and the Workaround

The issue is that there is a field from the Field Service Solution on the Opportunity named “Order Type.” This is an option set with the following values:

  • Item Based
  • Word Based
  • Service-Maintenance Based

In version 6.x of the Service Module, there is some business logic that causes the Opportunity record to be read-only if “Order Type” = “Service-Maintenance Based.”  Therefore, changing the Order Type to “Item Based” will “fix” the issue with existing Opportunities.  And for those of you who are not using the Field Service Module, the following workflow can be triggered On Create to prevent the Order Type from being set to Service-Maintenance Record on any new Opportunities.  Here are the steps:

  1. Create an on-demand workflow named “Set Order Type”
    • Entity = Opportunity
    • Scope = Organization
    • Trigger = Create (UNLESS YOU USE FIELD SERVICE – in which case leave off all Triggers and use it as on-demand only*.)
    • Be sure to check “As an on-demand process” (so you can fix existing Opps as described below)
  2. The first and only step is Update record.
    • Description: Setting the record to Item based
    • Set Properties – look on the Opportunity form for a field named “Order Type” – probably will be on the lower right of the page under Additional fields.
    • Set this field to “Item based”
    • Click Save and Close
  3. Save the workflow, then Activate.

*Please note that if you set Create for the Trigger of this workflow, none of your new Opps will be set to Service-Maintenance Record. If this is your objective, then this workflow will work. If you are using Field Service, please leave off this Trigger.

Now fix the existing Opps.  You can do this two ways:

  1. Individual Basis. On the form, for these read-only records, one at a time as you find them, click “Run Workflow” and choose Set Order Type. Run the workflow, then refresh the screen, then change the form to Opportunity – Opportunity.  That should fix the one record.  ALTERNATIVELY …
  2. In Bulk. Create an Advanced Find like “All Opportunities where Status = Open and Order Type <> Item based.  Select all records in the results, and click Run Workflow against all of these records.

The second option will fix all existing open Opps (Qualified opps will be read-only, which is why we choose only the Open ones).

An Alternative Workaround

If you don’t want to create a workflow and you still want to fix all of your Opportunity records in one task, then you can also use the Data Refresh technique to achieve the same objective. This will not prevent future Opportunities from being locked in this manner, but it will change all existing locked records. This has the added advantage of changing Closed Opportunities as well.

  1. Create an Advanced Find of all Opportunities where Order Type = “Service-Maintenance Based”
  2. Add the Order Type to the column set and remove extraneous columns. You can leave the Topic column in addition to the Order Type column so you can at least see what you are changing.
  3. Export the results of this Advanced Find.
  4. Open the result file in Excel
  5. Activate the file (Enable Editing)
  6. Change the entire Order Type column values from “Service-Maintenance Based” to “Item based”
  7. Save the file.
  8. Import the file using the Import Data wizard.

This will unlock all of those records, and will also change the closed records as well.

Hope this helps. By the way, if you are interested in a guide to deploying Microsoft Dynamics 365 please have a look at my book here.