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
rajubalajirajubalaji 

we call that method with task id, it will delete all the data for that task in salesforce

Hi Team,

Here i need to write a program to delete the data,if any one knows please help me.
whenever we call that method with taskid,it will delete all the data from that task.

please help me.

thanks,
Balaji
ShirishaShirisha (Salesforce Developers) 
Hi Balaji,

Greetings!

Can you please find the sample code to delete the task record in the below documentation:

https://salesforce.stackexchange.com/questions/107090/sample-trigger-to-delete-task

You can make changes to criteria to fire this trigger as per your requirement.

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri