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
| Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience |
| The Agentforce Field Service and Operations core features, managed package, and mobile app are available in Enterprise, Unlimited, and Developer Editions. |
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.
| Error | Description | Possible Solutions |
|---|---|---|
| Generate new batch upon completion not met | 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. | 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. |
| Suggested maintenance date is out of range | 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. | 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:
|
| No work orders to create | We couldn't generate work orders for the maintenance plan because no conditions for generation were met. | Work orders cannot be created for the specified timeframe.
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. |
| End date in the past | We couldn’t generate work orders because the maintenance plan has reached its end date. To continue generating work orders, update the end date. | The maintenance plan has expired. Update the maintenance plan with a new end date. |
| Max limit of Work Orders exceeded | 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. | 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:
Note 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. |
| User does not have access | 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. | The user doesn’t have rights to create service appointments,work orders or work order line items. Have the Salesforce admin grant rights. If Auto-generate work orders 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. |
| Invalid values for Generation Horizon and Generation Time Frame | 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. | The date range for the maintenance plan extends beyond the allowed timeframe.
|
| Missing maintenance work rule after frequency fields migration | 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. | The org has hidden the Frequency fields in Setup, but maintenance work rules still need to be set up for the maintenance plan. |
| Missing maintenance work rules and frequency fields | 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. | The maintenance plan doesn’t have a maintenance work rule or frequency fields (Generation time frame and generation time frame type) defined. |
| Errors due to customization | 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. | Refer to Determine Whether Customizations are Disrupting Generation for additional solutions. |
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.

