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:

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

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)


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