XML Import does not import the contents of work note and additional comment

d-aizawa
Kilo Sage

Hi.

Imported Incident data between instances in XML format.

But, content posted in work note and additional comment is not imported.

Do I need to set anything in the Transform map?

Thank you!

4 REPLIES 4

Community Alums
Not applicable

Hi @d-aizawa ,

  1. Export Incidents, Change Requests etc. (whichever Task-derived record types you're interested in) from the source instance as XML, import to the target instance. DO NOT open any of the newly imported Incidents/Change Requests etc in the UI on the target instance yet
  2. Export the sys_journal_field records (as XML) for the Task-derived records exported in step 1 and import them into the instance
  3. Export Audit[sys_audit] records from the source where sys_audit.documentkey matches the sys_id's of the records exported/imported in step 1
  4. If you have viewed any of the records imported in step 1 in the UI of the target instance since the import: Delete the History Set[sys_history_set]/History Line[sys_history_line] records for those records. This can be done through the UI by opening the sys_history_set table
 
NOTE: This step 4 is necessary because what the Activity Formatter (the UI element which shows Additional Comments and Worknotes on the form) uses to display Comments/Worknotes is the data in the History Set/Line tables if it's available. If there's nothing in History Set/Line for a record then the first time you open the record in the UI, the History Set/Line data is generated from what's in Audit[sys_audit]. This is what you want if you've just imported the relevant Audit[sys_audit] records from the source instance - you'd want the History Set/Line data to be generated based on that
 
This process is also often discussed on the Community, example Community Post: How to migrate/import Comments and Work Notes from External Systems
 
Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Thank you for answering my question.

I'm doing the import in Scheduled Import at a specified time.

What do I need to do to set the steps you've taught to Scheduled Import?

Thank you!

Community Alums
Not applicable

HI,

This was not your original question.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

data for work_notes and comments is not stored in incident table but present in sys_journal_field

what's your business requirement here?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader