function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDC New learnerSFDC New learner 

How do we know the dependencies on a recordtype

Hi All,

We have a request to delete the record type in our organization. Is there any way to check the dependencies on record type and page layouts?

Any ideas or suggestions on this? Thanks!
Prafull G.Prafull G.
You can extract source code and search by name, label to find references.
Khan AnasKhan Anas (Salesforce Developers) 
Hi,

Greetings to you!

You can check the sfdcfox answer on StackExchange for a similar question:

https://salesforce.stackexchange.com/questions/228623/check-all-dependencies-of-a-record-type-in-the-organisation-before-deactivating

Because of the various complexities of how developers and administrators might use record types, there really isn't an "easy" way to identify every possible combination. For example, developers may have used its ID, or may have created a custom label, either with its name or ID, or may have put the value in a Custom Setting or Custom Metadata, and they may have been used in reports, email templates, Lightning Components, and so on. The best way to figure it out would be to look at the documentation, but many organizations do not document their configuration, either. If you don't have any documentation, then the only way to do this is to comb through your configuration.

I'd start by checking your Custom Labels, Custom Settings, and Custom Metadata to see if there are any aliases to the record type ID or name, and document these; this is mostly going to be manual work, unfortunately. From there, I'd consider doing a full metadata export (via Force.com IDE, for example), and doing a recursive file search for the name, the first 15 characters of the ID, and any custom labels, custom settings, and custom metadata that matches the potential values. Finally, you'll want to manually review the page layout assignments.

After you've documented and updated all of the values to use the new record type, you can then safely delete the old record type. I would also suggest doing this in a Sandbox first, if possible, and run all tests to see if anything breaks.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas