- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 10:43 AM
I have a table that extends HR Case. In that table is of course the State field. I was successful in turning on auditing for that field and a record is being written to the sys_audit table, but the Old Value and New Value are blank. Kind of defeats the purpose of auditing.
Any way to get those values to populate?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 09:15 AM
Found the answer in this Community Post by
https://community.servicenow.com/community?id=community_question&sys_id=2dbabbdddb820058d58ea345ca961988
It points to KB Article about Application Restricted Caller Access
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0759087
Found 2 records for the Script Include hr_CoreUtils in Requested status. Moved both of those to Allowed.
The sys_audit table now shows the Old and New Values for the State field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 10:56 AM
Hi
There's a utility that can help you with that: GlideScriptRecordUtil. It stores the fields and values of changes on an update.
Please refer to this link to learn more : a great example of its use on ServiceNowGuru.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 06:44 PM
Evaluator.evaluateString() problem: java.lang.SecurityException: GlideScriptRecordUtil is not allowed in scoped applications: com.glide.script.fencing.GlidePackageScopeHandler.found(GlidePackageScopeHandler.java:28)
As usual with ServiceNow, the good stuff won't work in a scoped app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 08:35 PM
Hi
As far as I know , this should work for you.
Couple of points to note here, when you switched on the Auditing, where have you done that?
Reason for checking this is because when you extend a Table from HR Case, state is a field which is coming from task table, so the correct way of to switch on Audit for your custom table will be as below:
1) Open your Custom table form and then Right click on the State Field and then select Configure-->Dictionary and then scroll down to the Related List named as "Dictionary Override" as shown below:
Now click on New and create a Entry for your Custom Table and update the attribute as below:
audit = true;
Have you tried this way? If yes, can you share screenshot of the Audit table where it is coming as blank?
Please refer to below HI article as well which may be helpful in this scenario:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0723730
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 05:29 AM