Guide to Cleaning up Salesforce Record Types
It’s all very well building out your Salesforce org to accommodate your processes further, even the complexity unique to your organization, but, there will come a time where you will need to take a step back and audit your setup. Record Types are one Salesforce feature that can be incorrectly implemented. So, Assessing what purpose your Record Types have, and removing those that don’t deliver any benefit, is an Admin job that shouldn’t be forgotten about. It’s a dirty job, but someone has to do it!
If you haven’t yet done so, please check out my previous post Record Types Best Practices (and hopefully you can avoid this drama altogether). When the damage is done, and you’re working in an Org with a Record Type problem – how can you resolve it? I will walk you through the 4 stages – from investigating to finally removing Record Types.
Orgs with Record Type Problems
Let’s first imagine this scenario….
You come into an existing Salesforce org, as a new hire or as an admin. During your first call with the Sales team, you learn that the users are frustrated by unnecessary clicks, bad page layouts, and general confusion on the Opportunity.
After looking around at the Opportunity, you notice their Opportunity object has five record types. Right away, this seems excessive – and it might be. But nobody, not even a seasoned, expert Administrator can make that call from this information alone.
Step 1: Investigation
Find out what you’re working with now by answering these questions:
- How many records are under each Record Type?
- Is each Record Type tied to a specific page layout?
- How many page layouts are there?
- Ask the users, “What is the purpose of each Record Type?” (Tip: ask more than one user)
- Are there any differences between the Picklist values on each Record Type?
- Are there major differences in the page layouts? (organization and required fields)
Like many of my Salesforce recommendations, a big portion of this task is not actually in Salesforce, it’s talking to your users questions, what they perceive the differences to be, or if they even find them useful. You’ll know a Record Type is good when you hear things like:
- “Oh the Renewal ones we have to fill out all this stuff, the New Business ones don’t have that.”
- “My manager makes sure we always choose the right Record Type”
- “The Product dropdown menu looks different for some of them…”
You’ll know they aren’t getting much benefit, or using them correctly, or set up incorrectly when you hear phrases like:
- “I have no idea what’s the point, everything looks the same to me.”
- “I choose ‘Renewal’ but then I still have to fill out the ‘New Business’ fields!”
- “I dunno I just choose whatever and go on.”
You’ll probably want to run a few reports, also. I ran this report showing how many Record Types have been created yearly, which shows me what is and isn’t being used:
You can see that there are three record types that aren’t being used at all (or being used very little).
You will also want to run a report that groups by Record Type, and looks at Picklist Values. Are each the Picklists customized to each Record Type? Do they need to be?
Step 2: Planning & Decisions
Next, you’ll need to map out the ideal, clean plan for using Record Types going forward. Check out my earlier Blog Post on planning out Record Types. The end result here is that you will have a map of the differences of each Record Type. While doing this, you’ll also need to decide which Record Types to delete.
In my above scenario, I want to consolidate down to two Record Types “New Business” and “Renewals”. So we’ll just rename the two with the highest volume and plan to delete the other three Record Types. My new map will only have those two Record Types.
Step 3: Make Some Changes
Important Tip: Make sure field history is enabled for any fields you’re going to modify in the process of cleaning up, and also use Data Loader to do an ‘Export All’ before you begin. If the worst-case scenario happens, and you get rid of something in error, you’ll be able to see your changes in the Field History, and also have an external doc you can use for reference or backup.
Start with making sure you have a corresponding Page Layout for each of the Record Types you’re going to keep and update them accordingly. You’ll also need to update any picklist values and default fields, for each Record Type you’re going to keep. You may need to update your Sales Processes if you have multiples.
Since we’re going to be getting rid of three Record Types, those are the ones I will focus on mass updating first. Just run a report filtering by the Record Type you want to remove, include the ID as a column, and mass update any field values that don’t match the new map you created earlier. Make sure to also migrate each record over to its new corresponding Record Type.
Once you have done this for each of the Record Types you want to remove, you should see that there are no more records under the Record type you want to delete.
Additional Considerations
Default Record Types on Profiles – You may need to adjust the default Record Type on your Profiles before deletion. Either change the default Record Type, or change it to “Master”. Changing the Record Type on the Standard Profiles is a bit more tricky, but it can be done. I can’t take the credit for figuring this one out, but the original answer can be found here.
Automation – Workflow Rules, Process Builder, code – Anywhere a Record Type might be referenced should be updated to either the proper new Record Type, or no Record Type at all. It may take you some time to look through here, and you can always look into specialized tools that do metadata search of Salesforce.
Reports, Filters, List Views, Rollup Summary Fields – You’ll need to update each of these as needed. If you have a large org, you may want to consider making a general enhancement update and a quick demo on how a user can update their own Report or List View Filters.
Sandbox First! As always, any changes you make to Salesforce should be fully tested and reviewed in Sandbox before moving to Production. The goal of cleanup projects like these is to make life easier for the end user, not harder. Working in Sandbox first gives you the ability to find any error messages or stumbling blocks along the way, fix them, and better prepare for the changes to your Production org.
Step 4: Delete the Record Types!
Yes, it’s really that easy! The most important part of this process is backing up your data before you begin. Export All and Field History are fast, easy, and free. If you happen to have a full copy sandbox, go ahead and refresh it before you begin. There’s plenty of paid services on the App Exchange as well.
Deleting anything in Salesforce can bring on a panic attack in even the most experienced admins, but if you take care, document your process, and have a backup, you’ll have clean Record Types and happy Users in no time!
Christopher Hickman (@cmh__mdt)
Great article. The one piece not addressed is how to delete those record types when they are configured as the defaults for certain profiles. Very painful, manual process 🙂
Stacy O'Leary
Thanks Chris! I found an Answer in the Community that explains how to do that: https://success.salesforce.com/answers?id=90630000000hNDeAAM I might write a blog post on this one later with screenshots, because I think it would be good to dive in to this scenario specifically.
Gidi
Stacy Hi,
This is a very useful article, thanks!
I would like to stress the neccecity of checking dependent processes, formula fields, code, etc, before making the changes.
Gidi
Stacy O'Leary
Thanks Gidi! That’s another reason to always try things out in Sandbox first before Production!
Ingo ter Meulen
One thing to add… Check, if any Record Type is reporting only (probable half way implementation w/o any values). Either to keep/fix or to remove.
Ian Gotts
All the above comments show that there are other considerations BEFORE you can delete a record type. Also you have record types embedded in ‘code’ (Apex, Process Builder, Flow) you have to check them out too and that is hard. BTW That is why people don’t delete record types. Can I suggest you update your article to include all of these other places to check in case people your read the article and not down to the comments?
pj
totally. Salesforce is still archaic when it comes do doing basic cleaning up functions such as this one.
Warren Rudman
I would suggest running a report that reports on last created date (export to Excel and pivot table with max(create date) ). Makes it real easy to focus in on where your attention should go.
Deepti
I would like to ask a question here. In the process of updating the sales processes for the record types, will the historical data associated with this will be deleted or overridden?