Requirement: Delete all tasks.
UseCase: Deleting tasks with task id less than a particular count.
Please follow the below steps.
- Goto Reports > New Query Report > execute the query and save it with a name.
- select taskid, helpdeskid "portaild" from taskdetails where taskid < 300
- All tasks with task id less than 300 will be deleted. This can be modified as per your requirement.
- Execute the query and save the report with a name. [Report name: deletetask]
Goto Admin > Custom Schedule Function > Global Function > New > Paste the global function contents and save it with a name.
- Update the URL and integration key in the script.
- You can get the integration key under Admin > Integrations > Integration Key > New
- Please use an integration key with admin privilege, as there wont be any role related permission issues.
- Update the integration key in the global function.
- Goto Admin > Custom Schedule Functions > New > Paste the content from Delete_task.txt and save it with a name
- Configure a custom schedule to invoke the created custom function with the query report as parameter.
- Note: We can configure this on repeat mode if the task count is huge.