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
sfdcdev.wordpress.comsfdcdev.wordpress.com 

Salesforce.com splitting records in bulk Activity Trigger

Hello,

 

We are trying to update some Task records using data loader or with Informatica.  We have 4 triggers on Task Object which will be executed once the record set is updated.

 

In the past what used to happen is that when set of 50 task records got updated, they used to be batched up and sent as one set. All the Governor Limits are applied against this set.

 

Recently what we noticed is that, 50 record set is being split into 50 individual records and each of the triggers is run for this Individual task. This process is repeated until all the 50 records are finished. All these operations happen in one context and all the SOQLs and DMLs are added up cumulatively. This is resulting in our code crossing the governor limits which in turn is causing the failure of the update.

 

Is anyone else facing the same issue? Were you guys able to resolve this? and if yes how.

It would be great if any one can provide us with solution to your problem.

 

We really appreciate your help.

 

Thanks,

Girish Suravajhula

 

 

Best Answer chosen by Admin (Salesforce Developers) 
sfdcdev.wordpress.comsfdcdev.wordpress.com

Hello,

 

After doing considerable amount of reseach we found that this issue araises when the tasks in the trigger are scheduled tasks/Events.

So the conculsion is extra care should taken when writing activity trigger becuase of the above explained issue.

All Answers

Ritesh AswaneyRitesh Aswaney

If there is such a setting as a batch size on this informatica dataloader, i would check the value set on there. the salesforce data loader, for eg, has a batch size (limit is 200).

sfdcdev.wordpress.comsfdcdev.wordpress.com

Hello Ritesh,


It is not related to batch size at all.

If this is related to batch size and dataloader is making separate calls instead of one bulk call with all the 50 records, Salesforce.com would not have considered it as one context. It would have started a new context for each of the tasks in the list and we would have never reached the governor limits.

However this is not the case. Also for your reference, I just confirmed the batch size in my dataloader and it is set to 200.


Thanks for the response any way.


Regards,
Girish S

sfdcdev.wordpress.comsfdcdev.wordpress.com

Hello,

 

After doing considerable amount of reseach we found that this issue araises when the tasks in the trigger are scheduled tasks/Events.

So the conculsion is extra care should taken when writing activity trigger becuase of the above explained issue.

This was selected as the best answer