---
schema_version: "1"
id: 35e136e8ece8c9d841db2e4212c2d3d98c76f51ed89ada1dfbe798d899f7ba77
title: Troubleshooting Work Order Generations in Field Service
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/fs_troubleshooting_work_order_generation.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.fs_troubleshooting_work_order_generation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 08a1a104aa5503c68ec2886711a905d4e33d444510b920a03832692a745d3b9d
description: If work orders aren’t generating as expected these guidelines can help you resolve any issues.
products:
  - Field Service
release: "264"
---
# Troubleshooting Work Order Generations in Field Service

If work orders aren’t generating as expected these guidelines can help you resolve any issues.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">The Agentforce Field Service and Operations core features, managed package, and mobile app are available in <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions.</td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/images/icon_note.png)

Note Refer to [Guidelines for Working with Maintenance Work Rules](https://help.salesforce.com/s/articleView?id=service.fs_multiple_maintenance_schedule_guidelines.htm&release=264.0.0&type=5 "With maintenance work rules you set up multiple recurring maintenance schedules for maintenance assets. Learn how maintenance work rule settings affect work order generation.") for details on how work orders are generated from maintenance work rules.

Watch the video to see how to get an overall view of the work order generation status.

## Work Order Status

The Work Order Generation Status field on maintenance plans provides a status to help determine how to handle work order generation errors:

- **Completed** indicates that the work orders were created successfully.
- **Unsuccessful** indicates that a work order wasn’t generated due to a possible unexpected error.
- **No Work Order Generated** indicates that based on the configuration, no work order was supposed to be created, so no action is required.
- **Needs Review** indicates that to continue the work order creation an action is required.

If the work order generation status is Unsuccessful or Needs Review, the following errors can appear in the Maintenance Plan Chatter feed.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Work Order Generation Error Messages">
        <caption>Work Order Generation Error Messages</caption>
        <colgroup>
          <col style="width:21.14164904862579%">
          <col style="width:33.82663847780127%">
          <col style="width:45.03171247357293%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d112533e124">Error</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d112533e127">Description</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d112533e130">Possible Solutions </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">Generate new batch upon completion not met</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">We couldn’t generate work orders for this maintenance plan. This maintenance
              plan uses the Generate new batch upon completion option. When the last work order is
              marked complete, a new batch of work orders will be generated. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">When Generate new batch upon completion is enabled, new work orders won’t be
              created until the last work order from the previous work order generation is
              completed. A work order is considered complete when its status falls into one of the
              following status categories: Cannot Complete, Canceled, Completed, or
              Closed.</td>

          </tr>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">Suggested maintenance date is out of range </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">Your dates are out of range, so we couldn’t generate work orders for this
              maintenance Plan’s maintenance Assets. For each maintenance asset, check that the
              Date of the first work order in the next batch is earlier than the maintenance
              plan’s maintenance plan end date. Also check that the date of the first work order
              in the next batch isn’t so obsolete that the Suggested Maintenance Date on the work
              orders would be in the past. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">
              <p>The end date of the maintenance plan is in the past. On the maintenance asset,
                update the Date of the first work order in the next batch to a date: </p>
              <ul>
                <li>Earlier than the maintenance plan’s End Date. </li>
                <li>That doesn’t cause the Suggested Maintenance Date on the work orders to occur
                  in the past. </li>
              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">No work orders to create </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">We couldn't generate work orders for the maintenance plan because no conditions
              for generation were met. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">
              <p>Work orders cannot be created for the specified timeframe. </p>
              <ul>
                <li>Check if the work order dates are in the past. </li>
                <li>Check that the COUNT and UNTIL conditions of RRULES are met. </li>
              </ul>
              <p style="margin-bottom:0;">If some but not all work orders were generated, check that the criteria and
                usage conditions on at least one of the maintenance work rules was met. </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">End date in the past </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">We couldn’t generate work orders because the maintenance plan has reached its
              end date. To continue generating work orders, update the end date. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">The maintenance plan has expired. Update the maintenance plan with a new end
              date. </td>

          </tr>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">Max limit of Work Orders exceeded </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">We couldn’t generate work orders because the work order limit for this
              maintenance plan was exceeded. To decrease the number of work orders, decrease
              cadence of work order, decrease the Maintenance Plan Generation Time Frame, or
              remove some maintenance assets. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">
              <p>The maximum number of work orders you can generate in any run is 2,600. When
                using auto generation and frequency fields, up to 2600 work orders are created and
                then the process exits. To reduce the number of work orders generated, update one or
                more of the following on the maintenance plan: </p>
              <ul>
                <li>Adjust the generation time frame to increase the span between future work
                  orders generations. </li>
                <li> Reduce the number of maintenance assets. Work orders are created per asset,
                  per suggested maintenance date. </li>
                <li>Reduce the number of Maintenance Work Rules.</li>
                <li>Decrease the frequency to increase the time between work order dates.</li>
              </ul>
              <div class="slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium">
                <div class="slds-media slds-media_responsive">
                  <div class="slds-media__figure"><span class="slds-icon_container slds-icon_container_circle slds-icon-note-note"><img style="margin-bottom:0;" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/images/icon_note.png" alt="Note"></span></div>
                  <div class="slds-media__body" style="padding-top:.5rem;padding-bottom:.5rem;"><span class="slds-text-title_caps">Note</span> A maintenance plan with a maintenance work rule using COUNT is limited
                    to 2,000 maintenance assets. If such a maintenance plan has more than 2,000
                    maintenance assets, no work orders are generated. </div>
                </div>
              </div>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">User does not have access </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">We couldn’t generate work orders because the maintenance plan owner doesn’t
              have permission to create work orders or service appointments. Ask your Salesforce
              admin for help. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">
              <p>The user doesn’t have rights to create service appointments,work orders or work
                order line items. Have the Salesforce admin grant rights. </p>
              <p style="margin-bottom:0;">If <samp class="parmname">
                  Auto-generate work orders</samp> is enabled for maintenance plans, the work
                order is created even if the maintenance plan owner doesn’t have permission to
                create work orders or service appointments.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">Invalid values for Generation Horizon and Generation Time Frame </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">We couldn’t generate work orders because some of your Maintenance Plan dates
              are out of range. Enter a maintenance plan Generation Horizon (Days) of 365 or less,
              and a maintenance plan Generation Time Frame equivalent to 20 years or less. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">
              <p>The date range for the maintenance plan extends beyond the allowed timeframe. </p>
              <ul>
                <li>Update the Generation Horizon to a value of 365 or less.</li>
                <li>Update the Generation Time Frame to 20 years or less.</li>
              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">Missing maintenance work rule after frequency fields migration </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">We couldn’t generate work orders because the maintenance plan’s frequency
              fields are blank, and it has no maintenance work rules on the maintenance plan or
              any of its Maintenance assets. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">The org has hidden the Frequency fields in Setup, but maintenance work rules
              still need to be set up for the maintenance plan. </td>

          </tr>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">Missing maintenance work rules and frequency fields </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">We couldn’t generate work orders because the maintenance plan’s frequency
              fields are blank, and it has no maintenance work rules on the maintenance plan. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">The maintenance plan doesn’t have a maintenance work rule or frequency fields
              (Generation time frame and generation time frame type) defined.</td>

          </tr>
          <tr class="">
            <td data-label="Error" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e124 ">Errors due to customization </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e127 ">We generated x of y work orders, a of b work order line items, and c of d
              service appointments for your maintenance plan. However, some work orders couldn’t
              be generated. To find out why, ask your Salesforce admin. Learn More in Salesforce
              Help. </td>

            <td data-label="Possible Solutions" class="slds-cell-wrap" style="vertical-align:top;" headers="d112533e130 ">Refer to Determine Whether Customizations are Disrupting Generation for
              additional solutions. </td>

          </tr>
        </tbody>
      </table>

## Resolve Issues that Need Review

When troubleshooting issues that have the **Needs Review** status, complete these steps:

- Address the issue based on the solution in the “Work Order Generation Error Messages” table.
- Turn off **Auto-generate work orders** and run manual generation for the work orders.
- After the status becomes successful, turn on **Auto-generate work orders**.

## Determine Whether Customizations are Disrupting Generation

Work order generation can fail when objects related to the process, such as Work Order or Service Appointment, have customizations. If a generation fails, take these steps to determine which of your changes is causing the failure and make corrections. If you don’t think your changes are the cause of the generation failure, contact Salesforce Support for assistance.

- Verify that you can create a work order manually. If manual creation fails, correct any errors.
- Verify that any custom-required fields on the following objects have a default value configured. Default values ensure that the maintenance plan generation process knows what value to set for the custom fields.
    - Work Order
    - Work Order Line Item
    - Asset
    - Service Appointment (if the work order generation includes creating Service Appointment)
    - Assigned Resource (if you have automation to auto-schedule Service Appointments)
- Verify that custom automation, including triggers, processes, and workflows, on the following objects aren't interfering with the process by disabling them and rerunning work order generation:
    - Maintenance Plan
    - Work Order
    - Work Order Line Item
    - Asset
    - Service Appointment, if the Work Order Generation includes creating Service Appointment
    - Assigned Resource, if you have automation to auto-schedule Service Appointments
- Verify whether you can generate work orders with custom validation rules on the following objects disabled:
    - Work Order
    - Work Order Line Item
    - Asset
    - Service Appointment
    - Assigned Resource
- Verify whether you can generate work orders after deactivating custom lookup filters on fields from the following objects:
    - Work Order
    - Work Order Line Item
    - Asset
    - Service Appointment
    - Assigned Resource
- Saving a record containing a picklist field results in an error if the default value isn't set and the picklist only allows dependent values. To prevent this error, ensure that your picklist fields meet these conditions:
    - The referenced picklist field has Restrict picklist to the values defined in the value set is set to Enabled.
    - The referenced picklist field is a dependent picklist.
    - The page layout doesn't include both the controlling and dependent picklist fields.
    - A default value is set for the referenced picklist field:
        - If the object includes record types, the error occurs if the record type sets the default value.
        - If the object doesn't include record types, the error occurs if the picklist field sets the value.
        - All record types have the newly created picklist selected in the Selected items section and not in Available items.
    - Initiates a mass quick action with a predefined value set.
    - Any active trigger on the object where the field is used gives an error.

## Get More Information Using Debug Logs

To get more information on why generation failed, turn on debugging, Work order generation is an automatic process that uses an automated process user in the background. By default this process doesn’t generate debug logs. To enable debug logging for the automated process user:

- From Setup, in the Quick Find box, enter Debug Logs, and then select **Debug Logs**.
- Click **New**.
- In Traced Entity Type select Automated Process.
- Enter a start date for the logging period.
- In **Debug Level** choose SFDC\_DevConsole.
- Save your changes.

You can also make these settings in the Developer Console.

When you generate these logs, note the following:

- Allow up to 24 hours for the logs to become available.
- Use the finest log level for the Automated Process log.
- Review all logs and inspect their content. This review should include all logs with the success status, as exceptions are handled during maintenance plan generation and don’t result in the logging of unhandled exceptions.

#### See Also

- [Set Up Debug Logging](https://help.salesforce.com/s/articleView?id=xcloud.code_add_users_debug_log.htm&type=5&language=en_US)