Track asset change of user

Jean-Yves1
Tera Expert

Hi,

 

I got a request to track (through report/audit/else) which asset belong or has belonged to a specific user for traceability issue.

Any idea what the best way to do it? 

Activity stream would be nice, but doesn't exist on the user table, and the asset is a related list.

 

Any advice are welcome!

Thanks!

2 ACCEPTED SOLUTIONS

hi,
I was finally able to create the feature we needed base on your information.
So the final version is a UI Action, which will open a Modal view which will display assets history base on the sys_audit table (Query done inside a script include) 
I put the updateset in attachment in case someone has the same need.

Thanks!

View solution in original post

Hello @Jean-Yves1 ,

 

Thank you for sharing it. It will help a lot. Can you please mark it as helpful and mark correct.

 

Thank you,

Omkar

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

View solution in original post

5 REPLIES 5

Community Alums
Not applicable

Thank you, that a good start.
But, There is a strange behavior I do not understand.
When I browse https://<instance>.service-now.com/now/nav/ui/classic/params/target/sys_history_line_list.do,
and try to filter the "new" value by the person, it does not show me all asset until I go in the asset and display the asset (no change made on the asset) .. After this, when I refresh the view, the record is displayed.
Any idea?
Thanks

JeanYves1_0-1719299302944.png

 



Hello @Jean-Yves1 ,

Because The History [sys_history_line] table stores the actual changes to field values that occurred.

  • The system automatically generates History Set and History records as needed from the Audit table when a user either creates a record or requests its history.
  • Rather than containing a complete history of all changes in the system, History Set and History records only contain a recent subset of historical information for records where users have created or requested such information.

Please check the below link for more info

https://docs.servicenow.com/bundle/washingtondc-platform-security/page/administer/security/concept/c...

It will be good to write the scritpt include and use sys_audit table and then call the scritp include in the Reports Filter.

Thank you,

Omkar

 

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

hi,
I was finally able to create the feature we needed base on your information.
So the final version is a UI Action, which will open a Modal view which will display assets history base on the sys_audit table (Query done inside a script include) 
I put the updateset in attachment in case someone has the same need.

Thanks!