- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 02:08 AM
Is there a way to update the 'Update Time' field in 'sys_history_line' table with a past date? I have been trying to perform the same action , in order to produce some test data for my Schedule Job. But when I try to update the specific record with the desired Update Time. I get the following error -
"org.mozilla.javascript.EcmaError: 1 is not a function."
I have deactivated the ACL.write for 'sys_history_line' table and the fields are editable for me. But even if I try to update it manually with a past date, even though the update action gets triggered but the value is not getting saved.
I have also tried to attain the same by using setWorkflow(false) and autoSysFields(false) as well, but the same error appears regarding the code - "gr.update()".
Could anyone please provide a helpful solution? Solutions or Suggestions would be highly Appreciated.
Thanks!!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 05:16 AM
Hi Kushal,
The short answer is no, you cannot and should not modify it.
The sys_history_line table is your record of what happened and when. It is often used for audit purposes to find out who did what and when. It is a very special table and as a result should not be modified. The system recognizes this and prevents you from tampering with it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 03:36 AM
HI,
I tried replicating same behaviour and ended up with the same result.
I think its non-editable even though we modify the ACLs, Below are the different ways.
By Script: Doesn't work.
By Editing Form: Doesn't work
By Editing List: it works.
Its something at the backend may be the SQL level.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 05:16 AM
Hi Kushal,
The short answer is no, you cannot and should not modify it.
The sys_history_line table is your record of what happened and when. It is often used for audit purposes to find out who did what and when. It is a very special table and as a result should not be modified. The system recognizes this and prevents you from tampering with it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2018 02:16 AM
Hi All,
I have got similar scenario in which Incident's Opened field in History showing OLD and OLD VALUE as BLANK. And New as correct date time when the ticket has been logged with considering Day light saving however on History its New Value is showing an hour less. For an example, New is showing 2018-05-29 10:13:48, which is displayed on ticket too and New Value is showing 2018-05-29 09:13:48 through History. May I know how New Value has been picked and why the ticket still showing 10:13 as logged not 09:13?
Any help would be much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2021 08:45 AM
Hello,
I realize this post is old however I ran into a similar issue. I needed to test something that was last updated in the past. I was able to accomplish my goal by exporting the record (xml) and editing the <sys_updated_on> section keeping the same time format is important. Once I saved the xml and imported it back in, the date/time I manually entered remained.
Chuck is correct that this should not be tampered with for audit purposes, but for testing this technically can be done with the work around.
Please, remember to mark Correct or Helpful if you find my response useful.
Kind Regards,
James Roehling