function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CTU007CTU007 

ContactDuplicateTrigger: cannot mass insert contacts

Today I tried to insert 400+ contacts but got an error, it only allows me to insert in 20 batch...

 

Error:

 

Developer script exception from xxxxxc. : ContactDuplicateTrigger : ContactDuplicateTrigger: execution of BeforeInsert  caused by: System.Exception: Too many SOQL queries: 21  Trigger.ContactDuplicateTrigger: line 4, column 27

 

Apex script unhandled trigger exception by user/organization: 00500000006otAq/00D00000000hhjt

 

ContactDuplicateTrigger: execution of BeforeInsert

 

caused by: System.Exception: Too many SOQL queries: 21

 

Trigger.ContactDuplicateTrigger: line 4, column 27

 

Then for each batch job, I got an error:

 

Operation: insert.Contact

 

By user/organization: 00500000006otAq/00D00000000hhjt

 

Caused the following Apex resource warnings:

 

Number of SOQL queries: 20 out of 20

 

I will have to remove this trigger from my org.