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
SergiSergi 

Future calls in trigger and massive updates

Hi,

my problem is that a trigger in Opportunity makes future calls to an external API, one call per product in the opportunity.

 

Now, we have to update 1200 opportunities at once, we can do it with the "massive updater", but the trigger will fail 'cos of the maximum 10 future calls governor limit, is that right?

 

Do you know any way to pass trough this issue? 

Message Edited by Sergi on 02-11-2010 11:40 AM
Anand@SAASAnand@SAAS
The most efficient way to do this would be re model your external service to accept an array of "Products" v/s 1 product. In your trigger (which processes 100 records at a time), you batch up all the related products to the Opportunities being updated and send it to your external service.