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
Greg HGreg H 

UNSUPPORTED_APEX_TRIGGER_OPERATION

We have a trigger on Task that has been working fine for over a year. Recently, an admin tried to add a number of recurring Tasks via the data loader and received the error message "UNSUPPORTED_APEX_TRIGGER_OPERATION:Apex Task trigger cannot handle batch operations on recurring tasks."

 

I thought I could update the trigger to check for recurring tasks but that still doesn't resolve the problem. Has anyone come across this error and, if so, how did you resolve it?

-greg

Best Answer chosen by Admin (Salesforce Developers) 
Greg HGreg H

I finally received responses back from the premier developer support. The gentleman I worked with had never seen this error and initially thought it was something I coded into the functionality on purpose. After working through various scenarios, we figured out that the functionality and the resulting error is expected behavior.

Here's the line from the Salesforce documentation: "A trigger invoked by an insert, delete or update of a recurring event or recurring task results in a runtime error when the trigger is called in bulk from the Force.com API."

I guess there must be some reason for this limitation so I'll have to deal with it until some future release where this is addressed.
-greg

All Answers

Greg HGreg H

I finally received responses back from the premier developer support. The gentleman I worked with had never seen this error and initially thought it was something I coded into the functionality on purpose. After working through various scenarios, we figured out that the functionality and the resulting error is expected behavior.

Here's the line from the Salesforce documentation: "A trigger invoked by an insert, delete or update of a recurring event or recurring task results in a runtime error when the trigger is called in bulk from the Force.com API."

I guess there must be some reason for this limitation so I'll have to deal with it until some future release where this is addressed.
-greg

This was selected as the best answer
B2000B2000

I have the same problem.  I have an apex class that inserts recurring tasks and a trigger that sends out emails on closed tasks.  The insert fails with "System Exception: Apex Task trigger cannot handle batch tasks." Did you find a solution?

Thanks

SF User.ax1137SF User.ax1137

Hi Brian,

 

Can you please tell me how to insert the recurring task through apex class?Thanks in advance...

B2000B2000

I never found a solution.

Chris Baldock 10Chris Baldock 10
Hey guys, solution here is to load these records into salesforce using the standard API and a batch size of 1. This should get those pesky recurring task records in sharpish : ) 
David BermanDavid Berman
I got this error when trying to migrate an account trigger. I think it's due to a package that deals with activities and activity plans.