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 ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • 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 ...
                      • Query to list request IDs with Requester and Technician Employee ID (MSSQL)

                        Tested in build MSSQL (14306) Sample Table Database : MSSQL Query SELECT "wo"."WORKORDERID" AS "Request ID", ti.FIRST_NAME AS "Technician", td.employeeid "Tech Employee ID", ti1.FIRST_NAME AS "Requester", td1.employeeid "Req Employee ID" FROM ...
                      • Query for request attachment details (MSSQL & PGSQL)

                        Tested in builds from PGSQL (14300) or MSSQL (14306) Requests with Attachment, its name and path SELECT ad.ORG_NAME AS "Account", wo.WORKORDERID AS "Request ID", wo.TITLE AS "Subject", ti.FIRST_NAME AS "Technician", sa.ATTACHMENTNAME "Attachment ...
                      • Can we restore a deleted technician as it appears under deleted users?

                        Once a technician user account is deleted, the same user account cannot be added back. When a technician is deleted, we do not delete all the traces of the user. For historic purposes, the user will be available in certain records. create a new user ...