Apr 06 2020 08:19 AM
Apr 06 2020 08:19 AM
I am attempting to use either copy or move to copy documents from one team site to another. The copy is working just fine, but I want to move the metadata (it is not managed metadata) along with the files. I thought that move to was supposed to move the metadata but it does not seem to be working. What is the best way for me to move these files.
I am working on SharePoint Online
Apr 06 2020 09:38 AM
It is the default expected behavior. The Content Type and Fields should be present/created in the destination library after which you would be able to move the files along with their metadata.
If you are moving the files to a fresh new document library at the destination and if your source library has only few fields, then you could create those fields in the destination library manually, otherwise, if your Library has lots of Content Types and Fields including Custom Content Types, you could Save the Source Library as Template with content and upload this template to List Template Gallery in your destination site and use this template to create the new document library and you could move subsequent new files with metadata using Copy To / Move To as per your requirement.
I hope this is helpful, please like it or mark it as a solution if it answers your query.
Apr 06 2020 10:22 AMSolution
Apr 06 2020 04:35 PM
@Swaminathan Sriramthe sites match with the fields, and the site does not allow custom content types. I am still unable to move the documents metadata.
I attempted to create a template out of the source document library, but I do not have the option to.
What do I need to do to enable the ability to create the template on a modern sharepoint library.
Apr 08 2020 06:36 AM
Can you try with a newly created document library at both source and destination with matching fields. Please let us know.
In Modern Team Sites and Communication Sites, by default when you create them, Custom Scripts is blocked because of which Save Library as template is not available in your Library settings page.
To enable save library as template in your Modern SharePoint Library, specific configurations have to be done in your SharePoint admin center (if not already done) and a specific PowerShell command should be run on the site where you would like to save library as template as per below -
1. SharePoint Admin Center (This step can be skipped if custom scripts configuration is already allowed) -
a). Navigate to the Settings page of the new SharePoint admin Center and sign in with an account that has SharePoint admin privileges.
b). At the bottom of the page, select classic settings page.
c). In Custom Script, select -
Allow users to run Custom Script on personal sites.
Allow users to run Custom Script on self-service created sites.
Save it and it can take up to 24 hours for the updates for your tenant.
2. To allow Save list as template for your specific site collection -
Run the below command in SharePoint Online Management Shell after connecting to your SharePoint tenant using Connect-SPOService command -
Set-SPOSite <SiteCollectionURL> -DenyAddAndCustomizePages 0
I hope this is helpful. Thanks.