URL with parameter XML exports raw data only


When exporting from the list view and using the Export > XML menu option, the raw data of selected records is exported with the associated journal fields (Additional Comments and Work Notes) and attachments. However, using XML parameter on the URL exports only the raw data of the records.


Data exportedURL with XML parameterMenu "Export > XML"
Raw dataYesYes
Journal fieldsNoYes
Currency informationNoNo
Data store on other tablesNoNo



This problem occurs when exporting the records using the URL containing the XML parameter. After importing the XML, there are no attachments or journal fields like Work Notes or Additional Comments on those records. However, some XML exports do contain the raw data plus the attachments and journal fields.


The context menu Export > XML contains the logic to export the records, the attachments, and the journal fields. However, although the XML parameter informs the application server to export the raw data of the records in the URL query, it contains no logic to export attachments, journal fields, audit records, currency fields, or any other data store on a different table.


If you need to export the attachments and journal fields (for example, Work Notes and Additional Comments), use the Export > XML menu option.

Export > XML
Here is the result of the export: The incidents get exported with the journals and attachments.

Export > XML result

If you do need to use the URL parameter, then you will need to create the logic to export the associated attachment and journal fields directly on their tables.

Using XML parameter

Using XML parameter results

The following guide provides information to help you understand how to export attachments and journals.

Data exportedTable containing the dataRelationship
Raw datatable on the URLraw record
Attachmentssys_attachmenttable_sys_id = sys_id of the raw record
Attachments_docssys_attachment_docsys_attachment = sys_id of the attachment
Journal fieldssys_journal_fieldelement_id = sys_id of the raw record


Note that journal fields are stored in the sys_journal_field table. They are linked to the records by the sys_journal_field.element_id = sys_id of the raw record.

Attachments are stored in the sys_attachment and sys_attachment_doc tables. They are linked to the records by sys_attachment.table_sys_id = sys_id of the raw record, and sys_attachment_doc.sys_attachment = sys_id of the attachment.


Article Information

Last Updated:2018-01-25 06:30:03