Migrate Rich Text Area Fields

RTA Migration Mar 25, 2020

A couple of years ago, I managed to build a basic tool that was sufficient enough to migrate rich text area fields within the orgs. Complexity around rich text area fields was to migrate images along with the content so I built an AppExchange package to help me & others in this situation.

I recently had to do a similar thing & found out that there are still no good tools that can address this issue completely so I thought I will pick up my old tool & tweak it to make it working for the latest Salesforce release. As of today, I am opening up this tool and making it public so that anyone can use it & tweak it accordingly.

Problem

Since Salesforce stores RTA(Rich Text Area) images on a different server and reference them as links in fields, it becomes hard to migrate them because, in the migration, the link along with the content gets migrated which is not relevant to destination org due to unavailability of that resource server.

Concept Behind the Tool

The concept behind this tool is simple. Instead of sending the links for images in the content, we need to pass the Base64 encoded string of the image which will automatically get stored in the resource server specific to destination org on migration.

This tool uses a website(Force.com site) in the source org to get the base64 encoded string of the image stored in the RTA field, replaces the link with the gathered string & migrate the information to destination org.

Technical Bit

This tool stores your destination's information like (Username, Password, Token, Destination Object, Fields & Mappings) in a custom setting and uses SOAP API to migrate the from source object to destination object. It works on the concept of UPSERT so there is a need to create External Ids on both the orgs.

Usage

Full code can be found with the below link. It has all the steps to configure it once the tool is deployed to your org. It comes with a permission set that can be assigned to any admin user to get access to the app & its related tabs for configuration.

Rich Text Area Image Migration
Migration utility to transfer all Rich Text Area fields from one org to another with ease. To start using it, follow below steps: Assign ‘RTA Permission Set’ to your user to get access to ‘RTA Migration’ app. Review `RTA Migration` tab to know all the pre-requisites. Move to ’RTA Migratio…

Screenshots

Lakshay Katney

Salesforce Architect by profession but I like to work with various technologies. I blog about Force.com, Mobile Apps, Angular(JavaScript in general). I am a Salesforce, JavaScript & NodeJS fan.