How to populate new field's data in Audit history?

Community Alums
Not applicable

Hello,

We are using Transport orders/Transport order lines, which automatically updates quantity in Consumable table.

For example, if there is a TOL raised for consumable (for 2 quantities), after 1 quantity of the order is received, in the consumable table, quantity is updated.(screenshot as follows)

TOL Creation:

find_real_file.png

Consumable history details:

find_real_file.png

We want to populate transfer order line number in the Consumable history under the field Quantity so that every time quantity changes we are able to track the requirement.

The Transfer order line gets created on "alm_transfer_order" table and Consumable history available on "alm_consumable" table. In order to copy Transfer order line number from Transfer order table to consumable table i have created one Journal field called TOL Number(based on suggestion given in Service Wiki) but not sure how it works. There is also TOL Number field available by default.

find_real_file.png

How will this work? Does it require a business rules? Please share the solution.

Thanks & regards,

Jainil Shah

2 REPLIES 2

vab_13
ServiceNow Employee
ServiceNow Employee

Open the filed definition in sys_dictionary


and remove following from attributes: "no_audit=true"



From Wiki:





3.1 Information Exempted from the Audit History

Some updates are not audited despite enabling auditing on a table. This is why you may see 132 updates in a record's history, but only seven audited ones. Auditing excludes the following information:


  • Any updates made by an upgrade.
  • Any updates made through import sets.
  • Any records in parent or child tables.
  • Any field with the no_audit dictionary attribute.
  • Any system tables not listed in the glide.ui.audit_deleted_tables property list.
  • Any field that begins with the sys_ prefix (system fields) except the sys_class_name and sys_domain_id columns.
  • Any time an inactivity monitor touches a record (this prevents you seeing possibly hundreds of updates listed against an incident, with the noise drowning out the useful data).





Mark your feedback( Like or Helpful or Correct) as per the impact of my response. Cheers!


Vab


If you want to see the changes to TOL Number field's based on Quantity field changes then you could either use activities field and make sure you have added these field to activities filter.



find_real_file.png



Or else you could create a table to capture the changes and add this table as related list to the current table


Or else you could use he Activity history concept and turn the audit=true for TOL Number . But assuming in this case TOL number changes only when quantity changes.