Query to find requests deleted by technician

Query to find requests deleted by technician

Working on Builds 14500

This report is used to find the deleted request in the application. We can get the data from the Trash and system log viewer.  

To make any changes to a query, refer to the KB article below.

SELECT err.message "System log message",
       err.errormodule "Module",
       err.suberrormodule "Sub Module",
       err.action "Action",
       err.type "Type",
       au.first_name "Performed by",
       longtodate(err.occurredtime) "Time of occurrence" FROM errorlog err
LEFT JOIN aaauser au ON err.ownerid=au.user_id
WHERE err.action LIKE '%Delete%'
  AND err.errormodule LIKE '%Request%'
  AND au.first_name IS NOT NULL
  AND occurredtime >= <from_today>
  AND occurredtime <= <to_today>
Available Date Templates

Today - <from_today> - <to_today>
This week - <from_thisweek> - <to_thisweek>
Last week - <from_lastweek> - <to_lastweek>
This month - <from_thismonth> - <to_thismonth>
Last month - <from_lastmonth> - <to_lastmonth>
This quarter - <from_thisquarter> - <to_thisquarter>
Last quarter - <from_lastquarter> - <to_lastquarter>
Yesterday - <from_yesterday> - <to_yesterday>
This year - <from_thisyear> - <to_thisyear>
Last year - <from_lastyear> - <to_lastyear>

Trash

SELECT WORKORDERDELETEHISTORY.WORKORDERID "Request id",
       CI.CINAME "Requester",
       Workorder.TITLE "Subject" FROM WORKORDERDELETEHISTORY
LEFT JOIN Workorder ON WORKORDERDELETEHISTORY.WORKORDERID=WorkOrder.WORKORDERID
LEFT JOIN CI ON WorkOrder.REQUESTERID=CI.CIID
 

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to email pending requests list to technician periodically

                      This post describes the use of a python script to email pending requests to each technician in a periodic interval using Custom Schedules.This showcases the use of a feature called 'Custom Schedules' that was released in the build 9300 of ServiceDesk ...
                    • Query to track technician activity on tickets (MSSQL & PGSQL)

                      Tested in build PGSQL (14300) and MSSQL (14306) Use case: This query will help you find what are all activities that the technicians have done on requests other than the assigned ones SELECT au.first_name "Technician" ,wo.WORKORDERID "Request ...
                    • Request missing

                      Use case: In some cases, requests are missing. We would get the ID number from acknowledgement notification but we cannot find that in the tickets. In such cases, please follow below steps to find out the details. 1. Make sure to check the Request ...
                    • Request violated by technician

                      This report used to find the technician who violated the request. If the request/incident already has a violation and is reassigned to another technician the new technician assumes the violation instead of the technician that the violation occurred.  ...
                    • Query to generate the report based on the total number of requests actioned by the technicians (MSSQL & PGSQL)

                      Tested in builds PGSQL (14300) or MSSQL (14306) This is a comprehensive report on the total number of requests updated by a technicians. This query provides a holistic view of technician activity like updating resolution process, such as updating or ...