In sys_audit (history) table all the data is not visible only few records were visible at a time

AshwiniSawant
Tera Contributor

Hello @Uncle Rob ,

 

We have below requirement -

1. We have our own module for Security Incidents and user want to calculate the below -

2. There is automation due to which tickets got assigned to robot and then team members get those ticket assigned to themselves (reassignment).

3. User want to fetch the data like which assignee have reassigned that ticket in how much time since its open. i'e update time of the ticket.

4. When we try to check data in audit history table, all required data is not visible , can you please help me why all the required data is not fetched at the same time. Only few records were visible at a time, and we need to find data by searching individuals name but overall its doesn't showing all the data. 

Below is the result column we want -

 

AshwiniSawant_0-1737132710586.png

 

Thank you in advance !

 

10 REPLIES 10

Hello @Ankur Bawiskar , Thanks for your response, as I mentioned this is the custom module we have created so do I need to create a new metric definition for this?

Also regarding my next query - 

Why all records are not visible in the sys_audit table though the type of record is Audit. When I try to search it one by one then some of the records appears but not all. Any reason?

 

@AshwiniSawant 

you can create metrics for your custom table

As already mentioned if the update happened using setWorkflow(false) then that record update is not audited

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Can you help me with the steps like how to check this - update happened using setWorkflow(false) because for same record type other records are visible in the same table. 

E.g. User A updated 2 Security INC (INC with same details) one record can be seen in sys_audit but another is missing. 

This is the danger of setWorkflow(false).
You don't get all the automations you expect with an update.

@AshwiniSawant 

you will have to search that script in your instance which is possibly using setWorkflow(false)

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader