Guidelines for Loading Document Records

Document records store information about documents, such as visas, licenses, and medical certificates, for a person. Document records can include electronic versions of the documents as attachments.

This topic describes how to load Document Record and Document Record Attachment components for a person using HCM Data Loader.

Document Type

Document records exist for a specific document type. You must ensure that the document type exists in the target environment. The definition of the document type identifies supported and required attributes.

Attachment Files

The Document Record Attachment component holds the electronic version of a document for a person. Use the attribute URLorTextorFilename to supply the:

  • URL, if the DataTypeCode is WEB_PAGE

  • Text, if the DataTypeCode is TEXT

  • File name, if the DataTypeCode is FILE

If you're uploading attachment files, then they must be in the same .zip file as the DocumentsOfRecord.dat file that contains the related document records. All attachment files must be placed in a subdirectory named BlobFiles. This subdirectory is named for the BLOB data-type format in which attachment files are held. You specify the name of the attachment file on the File attribute of the Document Record Attachment component.

You can overwrite an existing attachment for a document record with a new attachment using HCM Data Loader. However, the overwriting happens only if the name of the existing attachment and the new attachment are the same.

Note: You can’t overwrite a document record attachment on the Document Details page. The UI still requires you to first delete the existing attachment file and then upload the new file.

Loading Document Records

You supply document record data in a DocumentsOfRecord.dat file. This example DocumentsOfRecord.dat file creates a passport document for a person and includes a PDF file of the passport as an attachment. It identifies both the document record and the attachment using source keys.

METADATA|DocumentsOfRecord|PersonNumber|DocumentType|Country|DocumentCode|DocumentName|DocumentNumber|AssignmentNumber|DateFrom|DateTo|IssuingAuthority|IssuedDate|IssuingCountryName|IssuingLocation|Comments
MERGE|DocumentsOfRecord|134003891|Passport|United Kingdom|PASSPORT_2442|UK Passport|355429|PS098123|2012/04/03|2022/04/03|United Kingdom Passport Control|2012/04/03|UK|London|JsmithPassportUpload
METADATA|DocumentAttachment|PersonNumber|DocumentCode|DataTypeCode|URLorTextorFileName|Title|File
MERGE|DocumentAttachment|134003891|PASSPORT_2442|FILE|Passport_2442|JSmithPassport|JSmithPassport.pdf

Deleting Document Records

You can delete Document Record objects using HCM Data Loader. When you delete a document record, any associated attachment record is deleted automatically. You can delete just the attachment, if appropriate.

This example DocumentsOfRecord.dat file deletes an existing document record. It identifies the document record using its source key.

METADATA|DocumentsOfRecord|DocumentdOfRecordId
DELETE|DocumentsOfRecord|1234567890