[SalesForce] error “AccountTriggerBefore: System.LimitException: Too many query rows: 50001”

I get error

"AccountTriggerBefore: System.LimitException: Too many query rows:
50001",

when attempting to change owner on account object via Apex Dataloader. There are 131 records that I am trying to update. Any ideas what does this mean and how to resolve this

Best Answer

The SOQL query used in the trigger AccountTriggerBefore is returning more than 50K records. Please use LIMIT and provide more filtering criteria in the SOQL query to reduce the number of records getting returned.

Related Topic