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
Hari N 20Hari N 20 

Batch apex to create task

I have one custom object and I have custom field which is lookup to account in the same object.
When record inserted in this custom object, I want create a task under open activities in account object. (Task shoud get create under same name of the account which we select from lookup field in custom object)

I want to write trigger for the same.
Please share syntax, if any one has syntax.
Tarun SuriTarun Suri
Hi Hari,

writting trigger on the custom object would be better idea rather than batch apex. Refer this link to get some idea about the syntax although its written for lead and Task so You have to manipulate the code according to Your Requirement.

Tarun Suri