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

Help with trigger

I have a trigger that is fired and does a callout whenever a specific custom field in Contacts object is updated to null.  The problem im having is every night a bulk data job is done that does an upsert on Contacts and throws the error CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY:itracmedia.In

validEmailContactTrigger: System.LimitException: itracmedia:Too many future calls: 11:-- for about 100 of 5000 records it processes but the field that fires my trigger is not updated in this data load.


Can anyone help me by explaining what can possibly be happening. 


It is a valid error due to the APEX Call out Limits.


A single Apex transaction can make a maximum of 10 callout to an HTTP request or an API call.


Once the date comes in to batch with a batch of more than 10 in the trigger it tries to do the callout more than 10 times and causes the problem.


So you need to either limit the batch size of the bulk data load or have to writhe a IF , ELSE block in the trigger to avoid the call out for this bulk data load.


Thanks and Regards,

Dinesh Nasipuri