Enabling audit on a child attribute?

snow_beginner
Giga Guru

Hi,

I have a requirement to enable audit=true on some fields on the cmdb_ci_base_rpa_robot table. The problem is that those fields are actually inherited from another table (cmdb_ci_appl) and I can't directly do audit on them because they are not the parent, but if I do it on the parent then all the child classes which inherit those fields will get that audit. 

 

I can't do dictionary override on it because audit override is not listed

snow_beginner_0-1780909289363.pngsnow_beginner_1-1780909317228.png

 

is there a way to do this? Thanks!

2 REPLIES 2

Tanushree Maiti
Tera Patron

Hi @snow_beginner 

 

Try it ,

  • Go to System Definition > Dictionary and search for the parent table (i.e cmdb_ci_appl) that contains the field you wish to audit.
  • Open the specific dictionary entry for that field.
  • Scroll down to the Dictionary Overrides related list and click New.
  • Set the Table field to cmdb_ci_base_rpa_robot.
  • Under the Attributes field, add or append the string to include audit=true
  • Click Update
Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Naveen20
ServiceNow Employee
Field-level audit is driven by a column attribute, and you can set that attribute on just the child table using the existing Override attributes option.

 

Steps:
1. On cmdb_ci_base_rpa_robot, create a dictionary override for the inherited field (right-click the field → Configure Dictionary, then the Dictionary Overrides related list).
2. Check Override attributes and add the audit attribute (audit=true for inclusion-list auditing) in the override's attributes field. This applies only to that field on cmdb_ci_base_rpa_robot, not its sibling classes.
3. Confirm auditing is enabled at the table level for the child table (Collection dictionary entry / audit_type) — field-level inclusion only takes effect when the table itself is audited.