When "Too many query rows: 50001" and "CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY" appear together, it means that an insert or update operation is failing due to a trigger or automation exceeding the SOQL query row limit (50,000 records).
E2120 - ECE_SForceUpdateInsert: We got an error back from SalesForce when trying to update or insert data in SalesForce.
Error returned from SFDC on upsert: [message: SalesOrderLineTrigger: System.LimitException: Too many query rows: 50001 , statusCode: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY ] , Record does not exist in SFDC, Data sent to SFDC: sObjects: [type: SalesLine__c , Unique_Key__c: 0#SO-013018#40000 , Name: 00040000 , No__c: LT , Description__c: Production only.
What is happening in Salesforce?
A record (or multiple records) is being inserted or updated.
A trigger, Process Builder, or Flow runs as part of this insert/update.
The SOQL query inside the automation retrieves more than 50,000 records.
Salesforce throws "Too many query rows: 50001".
The error "CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY" is thrown.
Solution:
Comment Editor X