- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 08:11 PM
Hi All,
We are developing a custom application that manages cases. This application replaces a system that the customer is using.
Their existing system currently has case notes, which would typically be modeled as journal entries in ServiceNow. The ask is to bring in these notes (along with timestamp and user ID) into ServiceNow at cutover. Is there any way to have these created so that the fields match the legacy system?
Adding the values from the legacy system in the note text would be a fall back, but may be confusing to users.
Thoughts?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 09:27 PM
You may be able to do it by importing the entries in to sys_journal_entry after you've already created the parent record (incident, problem, etc.) I haven't done this directly, but that's the table where the journal entries are stored so that's where I'd start.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 09:27 PM
You may be able to do it by importing the entries in to sys_journal_entry after you've already created the parent record (incident, problem, etc.) I haven't done this directly, but that's the table where the journal entries are stored so that's where I'd start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 11:14 PM
Hi Roshan,
Also, if you are planning to do through a script, you can use autoSysFields(false) to keep the same values for fields like sys_created_on, sys_created_by ...etc
'autoSysFields' is used to disable the update of 'sys' fields (Updated, Created, etc.) for a particular update. This really is only used in special situations. The primary example is when you need to perform a mass update of records to true up some of the data but want to retain the original update timestamps, etc.
//Change the category of all 'software' incidents to 'hardware' without updating sys fields
var gr = new GlideRecord('incident');
gr.addQuery('category', 'software');
gr.query();
while(gr.next()){
gr.category = 'hardware';
gr.autoSysFields(false);
gr.update();
}
https://www.servicenowguru.com/scripting/gliderecord-query-cheat-sheet/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2017 06:05 AM
Hi Antin,
Though the cheat sheet is helpful, the post is off topic. The question is around how I could populate journal fields with a predetermined time / user info on data load.
Thanks for the reply.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2017 06:10 AM
He's not that far off topic if you take in the account that records in sys_journal_field are based on the time the record was created (sys_created_on). If you have "massage" that field manually, then you are going to need the autoSysFields(false) method to keep the system from setting it for your to the current time when the record is imported.