What triggers the [sys_updated_on] field to get updated?

Korynn
Tera Contributor

I need to know what specifically triggers the [sys_udpated_on] field to get updated (I know  EVERY type of change/modification in ServiceNow (SN) does not trigger it to get updated).  Long story short: We have an external reporting system that we use for advanced reporting/queries.  The updates to that external reporting system are done on an incremental basis.  The incremental updates from (SN) are based on the [sys_updated_on] field.  Therefore, I need to know what types of updates will/will not make it into our external reporting system.

1 ACCEPTED SOLUTION

Gowrisankar Sat
Tera Guru

Hi,

sys_updated_on column on every table is defined by default in the Database of ServiceNow.

- These gets changed whenever there is a manual change in the record.

- Any business rule/script include/workflow/server side script updating the records will update this value.

- This doesn't get updated when there there is this code: autoSysFields(false); in the server side script.

- When you have a code which update sys_updated_on field, this doesn't get updated.

- This will not change sys_updated_on when you save a form, update a record through script but there are no changes in the record.

Check out these community articles for reference:

https://community.servicenow.com/community?id=community_question&sys_id=fafac7addb5cdbc01dcaf3231f96...

https://community.servicenow.com/community?id=community_question&sys_id=d0064761db1cdbc01dcaf3231f96...

https://community.servicenow.com/community?id=community_question&sys_id=58819f2ddbdcdbc01dcaf3231f96...

View solution in original post

10 REPLIES 10

Hi Dirk,

As long as this script gets executed in any session through the ways you mentioned, it will skip updates on sys_updated_on field.

There is no validity for this function, exception that the session should not get expired.

Does changing in relation table, such as cmdb_rel_ci, changes sys_updated_on in attached cmdb_ci records?
If yes, is the propagation continue to all related cmdb_rel_ci and cmdb_ci records?

Korynn
Tera Contributor

Thanks all.  We have a few (small percentage) of records where, we know the record changed, but the sys_updated_on field did not get updated.  We don't know why yet - thus the reason for my question.  I think your responses, Gowrisankar/Dirk, may probably hold the key.

Hi Korynn, did you in the end find the reason behind the small percentage of records where the sys_updated_on didn't update? How reliable is the export now? We are planning a similar incremental export and I want to verify that we won't be missing any updates. 

 

Korynn
Tera Contributor

And thank you to Debopriya as well 😉