You can copy a RecordInfo object from one location to another within the same file plan. The copy operation creates an identical copy of the RecordInfo object at a new location, leaving the original RecordInfo object unchanged. The copy of the RecordInfo object is associated with the same document object as the original RecordInfo object. The metadata associated with the record is also copied to the new location. You can optionally specify a different name, a different description, or both the copied record but you cannot modify the content of the record.
To copy a RecordInfo object from one RMRecordContainer object to another within the same file plan, call the copy method on the RecordInfo object. The method takes two parameters: aoDestination and aoRecordProps. The aoDestination specifies the destination container entity, and aoRecordProps specifies the properties of the copied record that are different from the properties of the original record.
void copyMethod(RecordInfo aoSource, RMRecordContainer aoDestination, Properties aoDestinationRecProps) { try { // Copies the record from the source to the destination container // The properties of the source record that are passed in the aoDestinationProps // are modified in aoDestinationRecProps aoSource.copy(aoDestination, aoDestinationRecProps); } catch(RMException aoRME) { } }
A precondition for copying the RecordInfo object is that the destination record container, record category, or volume should already exist. In addition, the destination record folder should be able to hold the RecordInfo object that is to be copied. The copy method raises an exception if the destination container does not exist or is unable to hold the RecordInfo object that is being copied.