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
soni rajputsoni rajput 

Problem in inserting recurring Task



There is one custom object which is a parent and task is child.

I have created a visual force page for filling custom object info
(Parent) and Child records info (Task).  Parents records can be more
than one because of this i am using batch

There is button on this page which will call a batch and that batch
which will insert parent object records and also child (Task records)
and in execute method we are collecting all the task in a list and
then upserting it. When we create recurring task then batch is
throwing error that "Apex Task trigger cannot handle batch operations
on recurring tasks."

For resolving this error i have created another batch to insert  task
record and instead of inserting list of task in first i am calling
second batch to insert task record and
using second batch size "1".

After using second batch following error is coming " batch method
cannot call a batch or future method".


How to resolve this problem??