Designers > K2 Designer for Visual Studio > Design Tools > Toolbox > Event Wizards > SharePoint 2010 Event Wizards > SharePoint Documents Wizard > Copy Documents > Copy Document Destination | Send feedback |
The Copy Document Destination wizard screen specifies the location where the document should be copied to.
Fig. 1. SharePoint Documents Wizard - Copy Document Destination
Feature | What it is | How to use it |
---|---|---|
SharePoint Site URL | Specifies the SharePoint Site URL where the document should be copied to | Specify the SharePoint Server URL e.g. http://SPSServer:121 OR use the ellipse button to open Context Browser and select the SharePoint URL |
Document Library | A SharePoint Document Library provides a central repository for team documents. This is an alternative to storing files in shared folders | Enter the Name of the Document Library where the document should be copied to in the text box, or use the ellipse button to select a DataField or XML Node. Alternatively use the Browse button to select the Document Library from the SharePoint Site |
Folder | A folder within the document library where the copied documents will be stored. | Provide a folder name as a destination for the document in the text box, or use the ellipse button to select a DataField or XML Node. Alternatively use the Browse button to select the required Folder |
Overwrite Existing File/Add as new | Check this option if the copied file is to overwrite an existing file | Check this option |
Preserve metadata | Specifies whether metadata should be preserved for the document being copied. | Select this option to preserve metadata for the document being copied. By default this option is selected. Deselect the option if metadata should not be preserved. |
Include Version History | This option will include the documents version history when the document is copied. | This option will only be available to select if the Preserve metadata option is selected. This option will only function if versioning is enabled for the SharePoint Document Library. Check this option. |
Add Document to this Process Field | Check this option to add the Document to this Process Field, as part of the workflow process | Check this option |
Content Field | Locate the K2 Process Field in the Context Browser and drag it into the field box | Enter the Name of the Process Field by typing or drag-and-dropping it into the text box |
The Preserve metadata option can be used to preserve metadata for the document being copied. This would typically be the columns:
It is however possible to preserve metadata from custom columns. The metadata will only be preserved for custom columns if the destination SharePoint Document Library has the same columns with the exact same name as the source SharePoint Document Library.
The Include Version History option will only be enabled for use when the Preserve metadata option was selected. The version history will only function when the specified SharePoint Library has versioning enabled. When the Include Version History option is checked, the current version of the Document will be kept. Unchecking this option will result in the Documents version to reflect as 1.0.
We recommend that the following updates are installed to make use of this functionality:
|
|
Example 1
Preserve metadata and Include Version History - Enabled:
In this example a SharePoint Document Library is used with the following columns and metadata:
Using the SharePoint Document Wizard to copy a document to a different SharePoint Document Library in a K2 process, the metadata will be preserved and the version history of the SharePoint item will be included after running an instance of the process. See the image below for results after running an instance of the process:
Note that the Created By and Modified By columns were preserved as the Preserve metadata option was enabled in the SharePoint Document Wizard. The SharePoint item version history was also included.
Example 2
Preserve metadata and Include Version History - Disabled:
The same SharePoint Document Library example is used as per example 1.
Using the SharePoint Document Wizard to copy a document to a different SharePoint Document Library in a K2 process, the metadata will NOT be preserved and the version history of the SharePoint item will NOT be included after running an instance of the process. See the image below for results after running an instance of the process:
Note that the Created By and Modified By columns were not preserved as the Preserve metadata option was disabled in the SharePoint Documents Wizard. The SharePoint item's version history was not included. The Created By and Modified By columns will revert back to the Service Account user. Note that the version history will revert back to the original version for example 1.0.
Example 3
Preserve metadata - Enabled; Include Version History - Disabled:
The same SharePoint Document Library example is used as per example 1.
Using the SharePoint Document Wizard to copy a document to a different SharePoint Document Library in a K2 process, the metadata will be preserved, however the version history of the SharePoint item will NOT be included after running an instance of the process. See the image below for results after running an instance of the process:
Note that the Created By and Modified By columns were preserved as the Preserve metadata option was enabled in the SharePoint Document Wizard. The SharePoint item's version history was not included as this option was disabled. Note that the version history will revert back to the original version for example 1.0.
Example 4
Overwrite a document with Preserve metadata and Include Version History options Disabled:
The same SharePoint Document Library example is used as per example 1.
Using the SharePoint Document Wizard to copy a document to a different SharePoint Document Library and overwrite the document in a K2 process, the metadata will NOT be preserved and the version history of the SharePoint item will NOT be included after running an instance of the process. See the image below for results after running an instance of the process:
Note that the Created By column will still be preserved since the Overwrite an existing file option was selected. The Modified By column was not preserved as the Preserve metadata option was disabled in the SharePoint Document Wizard. The SharePoint Document version history was not included as this option was disabled. The Modified By column will revert back to the Service Account user. Note that the version history will revert back to the original version for example 1.0.