Loading

Salesforce Field Service Optimization Job Fails with 'Too Many Query Rows: 50001' Error

게시 일자: May 15, 2026
상세 설명

Scenario Overview

In a Salesforce Field Service optimization job configured to run with 'Optimize in Stages', each service territory is processed in a separate stage — meaning one optimization request is created per service territory. When such a job contains 30 service territories, the sixth service territory in the job's service territory list may receive a failed optimization request with a status of 'Open'. This failure occurs because an Apex job encounters the following error:

Salesforce Field Service: Too many query rows: 50001

After this failure, optimization requests for the remaining service territories are not created.

솔루션

Understanding Engine Behavior

This article explains why optimization jobs skip service territories after a failure, and how behavior differs between the Logic Separation (LS) engine and the Enhanced Scheduling and Optimization engine.

In the Logic Separation (LS) optimization engine, this behavior has existed since the beginning — when one optimization request fails, subsequent service territory optimization requests are not created.

However, in the current Enhanced Scheduling and Optimization engine, this behavior is different: the system does not skip the creation of optimization requests for service territories that follow the failed one. Subsequent service territories continue to be processed.

Knowledge 기사 번호

000396116

 
로드 중
Salesforce Help | Article