Skip to content

CloudJedi/convert-documents-to-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convert Documents to Salesforce Files

Overview

Coming soon!

In the meantime, check out my other conversion to files projects:


Notes to myself during development

The conversion process starts in Doc2File_PrepareFoldersBatchable.cls. From there, just follow the code ;)

things to put in the wiki...

Salesforce does not (yet?) provide an automated way to migrate Documents to Files. The purpose of this open source project is to provide the community an option for automating the conversion.

Be aware of content limits:

  • https://help.salesforce.com/articleView?id=content_file_size_limits.htm&type=5
  • Max 2,000 libraries (take number of current libraries plus document folders must be <= 2,000)
  • Max 200,000 files can be created per 24/hour (less in dev orgs and sandboxes)
    • plan your migration accordingly as salesforce gives no programmatic way to know how close to the limit you are :(
    • if you blow through the 24/hour limit, you may have to contact Salesforce Support to increase it or users won't be able create/upload files for a while
  • this tool does not delete the original documents and folders because to do so requires to delete and purge the documents from your org's recycle bin. Making data irrecoverable is not the business I want to be in.

Post-conversion, for any documents that were marked as externally available, then need to enable public link sharing on the converted files.

Since Documents are not supported in Lightning Experience, you will want to initiate the conversion process from Classic. How to Switch from Lightning Experience to Classic If you cannot switch to Classic, make sure this feature has not been hidden from your user. Hide Option to Switch to Salesforce Classic

Documents whose file size is 0 bytes are not converted, unless their type is URL (aka, bookmarks).

The batch jobs send emails to notify the admin on conversion progress. If you use a free email service like yahoo, gmail, hotmail, etc. then your email provider may display a warning like "This may be a spoofed message" or "We couldn't verify the actual source". This is documented at https://help.salesforce.com/articleView?id=Salesforce-Outbound-Emails-Impacted-by-Google-DMARC-Policy-Adoption&language=en_US&type=1. If you use a work email address, then you might not notice anything.


Documentation and Discussion

  • Read the wiki page for further documentation on Convert Documents to Files app.
  • Read the FAQ page to help troubleshoot technical issues.
  • Raise well defined issues and ideas via the Issues feature.

Pre-Requisites

  1. Enable Create Audit Fields so Document create/update/owner fields can be preserved on the new files.
  2. As the admin performing the conversion, your user record needs Salesforce CRM Content User enabled.
  3. Read the instructions in the wiki for screen shots and step-by-steps.

Packaged Release History

Support

Documents to Files Converter is an open source project. It's an independent project with its ongoing development happening in the evenings and weekends. Maintaining and developing new features takes a considerable amount of time. If your business has found value in my projects, please consider showing your support by contributing to my virtual tip jar on PayPal. Thank you! ❤️

Release 1.0 (current)

  • In Development

Installing the Source Code (Developers)

You may install the unmanaged code from GitHub and make any desired adjustments. You are responsible for ensuring unit tests meet your org's validation rules and other requirements. You can conveniently deploy the source to a new scratch org using Andy Fawcett's deploy tool:

Deploy from GitHub

Credits

Doug Ayers develops and maintains the project.

FinancialForce Apex Metadata API Wrapper for developing tools for querying Salesforce Metadata API.

Cari Aves, Salesforce Product Manager, for providing encouragement and use cases.

Neil Hayek, Salesforce Files Expert, for providing solution design and guidance.

License

The source code is licensed under the BSD 3-Clause License