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
maddy27maddy27 

You cannot deactivate a record type if it is in use by an email routing address for Email-to-Case or On-Demand Email-to-Case.

Hi All,

Is there workaround for following error: 
The record type XYZ cannot be deactivated because it is referenced by a routing address. You must remove it from Email-to-Case routing addresses to proceed.

From Salesforce - 
"You cannot deactivate a record type if it is in use by an email routing address for Email-to-Case or On-Demand Email-to-Case." 

I'm trying to deactiate the record type and it comes up with following error.

Regards,
Maddy
Best Answer chosen by maddy27
SwethaSwetha (Salesforce Developers) 
HI Maddy,
As the error suggests, unless the reference is removed, the record type cannot be deactivated and we cannot have a workaround in this tightly coupled scenario.

Can you check if record type that you want to de-activate is referenced by any routing address. This prevents you from de-activating it.

You can go to Email-to-Case Settings and check each of the Routing Names to see which correct Routing Addresses needs to be managed

Related:https://help.salesforce.com/articleView?id=000337283&type=1&mode=1

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you

All Answers

SwethaSwetha (Salesforce Developers) 
HI Maddy,
As the error suggests, unless the reference is removed, the record type cannot be deactivated and we cannot have a workaround in this tightly coupled scenario.

Can you check if record type that you want to de-activate is referenced by any routing address. This prevents you from de-activating it.

You can go to Email-to-Case Settings and check each of the Routing Names to see which correct Routing Addresses needs to be managed

Related:https://help.salesforce.com/articleView?id=000337283&type=1&mode=1

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
This was selected as the best answer
maddy27maddy27
I found the reference in Outlook routing , thanks for the help