SFDC Sync Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: trgFindDunsAccount: System.LimitException: Too many query rows: 50001

Nina_Valtcheva5
Level 5

SFDC Sync Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: trgFindDunsAccount: System.LimitException: Too many query rows: 50001

Does anybody know what this error means?

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: trgFindDunsAccount: System.LimitException: Too many query rows: 50001

I've been seeing this error a lot for several weeks now and Marketo Support just told me to reach out to our SFDC Admin / SFDC support. Our SFDC Admin told me it has to do with whether or not these records have a website, but I'm not confident that's the case. All the leads affected are still syncing to SFDC despite this error but I just want to know what it means and how to stop it from happening.

Tags (2)
2 REPLIES 2
Kenny_Elkington
Marketo Employee

Re: SFDC Sync Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: trgFindDunsAccount: System.LimitException: Too many query rows: 50001

Hi Nina,

The cause of this error is that code firing during an insert event in your SFDC instance is making a SOQL query returning more than 50,000 records, causing the APEX code to throw an exception and the insert/update to fail.  While whether the code fires or not may have to do with whether a 'website' field is present on the record being inserted/updated, the exception is still the result of SFDC-side code, and there's nothing in the absrtact that can be done on the Marketo side to prevent it.  Your admin may be able to provide instructions or conditions that you can implement in Marketo, but it's usually going be better practice to fix the problem at the source, such as by switching to using Batch Apex​ in the offending code.

Jeff_Smith3
Level 6

Re: SFDC Sync Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: trgFindDunsAccount: System.LimitException: Too many query rows: 50001

Hi Nina,

This is a SFDC issue, not a Marketo issue. Here is a resource from their community that will help. You may have to go back and perform a single lead action to sync this one to your SFDC campaign. It's happened to me before...not often, but every once in a while.

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY - Salesforce Developer Community