Delete Tasks

Delete Tasks

Requirement:  Delete all tasks.

UseCase:  Deleting tasks with task id less than a particular count.

Please follow the below steps. 
  1. Goto Reports > New Query Report > execute the query and save it with a name.
    1. select taskid, helpdeskid "portaild" from taskdetails where taskid < 300
    2. All tasks with task id less than 300 will be deleted.  This can be modified as per your requirement.
    3. Execute the query and save the report with a name. [Report name: deletetask]
  2. Goto Admin > Custom Schedule Function > Global Function > New > Paste the global function contents and save it with a name.
    1. Update the URL and integration key in the script. 
    2. You can get the integration key under Admin > Integrations > Integration Key > New
    3. Please use an integration key with admin privilege, as there wont be any role related permission issues. 

    4. Update the integration key in the global function.

  3. Goto Admin > Custom Schedule Functions > New > Paste the content from Delete_task.txt and save it with a name

  4. Configure a custom schedule to invoke the created custom function with the query report as parameter. 
    1. Note:  We can configure this on repeat mode if the task count is huge.




                  New to ADSelfService Plus?