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
Andy Freeston_LarterAndy Freeston_Larter 

Unable to delete Record Type

Hi All,

 

I have created a Record Type for Opportunities. I have decided against using a Record Type so I now want to delete it.

I clicked Del and it lists the profiles that are using the RT. I have edited each profile, resetting the Record Type back to Master.

 

This works except for Standard Platform User. This profile does not have an option to set the RT for the Opportunities object. Opportunities is not listed at all for this profile.

 

I am now stuck with an unwanted RT. I can't delete it as SF says the profile is using it as the default.

 

Any ideas?

 

Thanks.

 

 

- Andy

 

Best Answer chosen by Admin (Salesforce Developers) 
flewellsflewells

I ran into a similar problem recently, though the message I got was that the record type was in use by Package Manager.  There's a solution titled "Why am I receiving the error "Cannot delete Record Type because it is in use by Package Manager or Salesforce Administration profile"?" within SFDC Help & Training that helped solve my problem.  I'm copying the contents here, maybe it will help.

 

 Issue:

Error: "Cannot delete a record type because record type is in use by Package Manager or System Administration profile".

Description:

These profiles are not supposed to be accessible as they are used for App Exchange packages.

When you go to the Package License Manager profile as an Org Admin, it tells you that you don't have sufficient privileges to change that profile. 


But the page we really need to get to is the Profile Record Type edit page. 

It doesn't make the same check on that page, so it's possible to build the URL directly. 


For example, build this URL

 

http://instance.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=ProfileID&tid=Object

 

 

Instance is the instance the customer is on (SSL, NA1-5, AP, EMEA). You just need to set the ProfileID to the profile ID of the Packaging License Manager (or System Administrator) and the Object to the name of the object (ie Contact, Account or the ID of the object).  This then allows you to  set the record type to whatever they want the default to be. Then they have the ability deactivate & delete the record type that they could not delete before.

 

See live example below:

https://emea.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=00e20000000taQq&tid=Contact&pn=Package+License+Manager


 

This is a workaround for that scenario.

All Answers

flewellsflewells

I ran into a similar problem recently, though the message I got was that the record type was in use by Package Manager.  There's a solution titled "Why am I receiving the error "Cannot delete Record Type because it is in use by Package Manager or Salesforce Administration profile"?" within SFDC Help & Training that helped solve my problem.  I'm copying the contents here, maybe it will help.

 

 Issue:

Error: "Cannot delete a record type because record type is in use by Package Manager or System Administration profile".

Description:

These profiles are not supposed to be accessible as they are used for App Exchange packages.

When you go to the Package License Manager profile as an Org Admin, it tells you that you don't have sufficient privileges to change that profile. 


But the page we really need to get to is the Profile Record Type edit page. 

It doesn't make the same check on that page, so it's possible to build the URL directly. 


For example, build this URL

 

http://instance.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=ProfileID&tid=Object

 

 

Instance is the instance the customer is on (SSL, NA1-5, AP, EMEA). You just need to set the ProfileID to the profile ID of the Packaging License Manager (or System Administrator) and the Object to the name of the object (ie Contact, Account or the ID of the object).  This then allows you to  set the record type to whatever they want the default to be. Then they have the ability deactivate & delete the record type that they could not delete before.

 

See live example below:

https://emea.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=00e20000000taQq&tid=Contact&pn=Package+License+Manager


 

This is a workaround for that scenario.

This was selected as the best answer
Andy Freeston_LarterAndy Freeston_Larter
SixPeopleSixPeople

Brilliant!!

Couldn't get inline editing on contact lists to work because I was messing around with record types and thought I could just delete what I created after 5 minutes.  Had to use this trick for free force.com user profile.

Thanks!  Now inline edit works on contact lists (and check boxes).

ApulidoApulido

looks great, but this works for standard objects and profiles.

 

I can't get this to work for a custom object for the Chatter free license.

ApulidoApulido

Ok. You people are smart. I figured it out.

 

I just had to look more closely at the URLs of custom profiles and made sure they matched what I wanted. It's structured differently that what you have above, but not too much.

 

cheers!

AdyAdy

Try passing the 15 digit salesforce id of the custom object for the parameter tid.

 

Ex:

/setup/ui/profilerecordtypeedit.jsp?id=00e80000000wl5Y&tid=01I80000001A941&pn=Contract+Manager

 

where 01I80000001A941 is the salesforce if for the custom object

kseehkseeh

Is there something about these instructions that I'm not quite understanding?  I'm just trying to delete record types on the opportunities object.  Followed (or at least I think I followed) the instructions re building the URL for that - but I can't seem to get it to work.

Andy Freeston_LarterAndy Freeston_Larter

You might need to provide some more information on what you are trying to do and how it's failing.

 

The instructions in the forum relate to changing the record types being used for a given profile, where that profile is read-only as in the case of the Standard Sales User.

 

If you want to delete the record type you should be using the standard record type edit page under Customise > Opportunities > Record Types.

Alicewonderland0Alicewonderland0

This is GREAT - thank you so much!! had been struggling to get rid of multiple unnecessary record types but couldn't access the record type editor for the Chatter profiles (that are not even in use here). This worked like a charm. THANKS! 

DV_skierDV_skier

when I try the above method I get the following error message: Data Not Available The data you were trying to access could not be found. It may be due to another user deleting the data or a system error. If you know the data is not deleted but cannot access it, please look at our support page. Click here to return to the previous page.

TlazTlaz

I'm trying to find the profile ID of the Package License Manager profile. When I go to setup->Administration Setup->Manage Users->Profiles, I don't see the Package License Manager profile to grab it's ID. Is there another way I can find the ID for this profile?

 

Thanks.

Andy Freeston_LarterAndy Freeston_Larter

You can query the Profile object for the Name and Id using Eclipse, the Data Loader, or the System Log.

 

Try entering this into the System Log:

System.debug( 'Id = ' + [SELECT Id FROM Profile WHERE Name='Package License Manager'] );

 

TlazTlaz

Thanks for the tip. For some reason, this query produces a null result. I tested the query with other profile names and it returns the proper ID as expected. Is it possible that I don't have this profile active in my SF instance?

Andy Freeston_LarterAndy Freeston_Larter

I don't have the profile eiher. After doing some reading it seem the License Manager user and profile are created 'special'. I can't view either of them and they don't appear in the User or Profile lists.

colemabcolemab

Great post!  This allowed me to change the default record type for 'Partner Network' profile that I couldn't otherwise edit.    That profile's default was stopping me from deleting a record type.  Thanks for the information!.

GuyClairboisGuyClairbois

Anybody: if you're getting:

 

Data Not Available The data you were trying to access could not be found. It may be due to another user deleting the data or a system error. If you know the data is not deleted but cannot access it, please look at our support page. Click here to return to the previous page.

 

try changing the url from http:// into https://

 

This worked for me.

 

BTW: does anybody where the '&pn=Contract+Manager' addition stands for? It does not seem to be object-related, since it works the same for all of my custom objects..

 

Rgrds,

Guy

omarjmansour.ax1111omarjmansour.ax1111

Awesome! Thanks for all the great info!

swethasfdcswethasfdc

For me its not working for the custom object.....

Any suggestion from anyone???

broncobronco

This doesn'r seem to work for me.
Here is the URL:
https://na7.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=00eA0000000tn18&tid=01IA000000145nl&pn=Authenticated+Website

 

If I select None, it won't let me Save. If i select a different record type as the default, it makes no difference to the  Edit record Type page - it still says the profile is in use:
This record type Funds In cannot be deactivated because the following profiles use this record type as default. 

MellycooksMellycooks

Thank you so much!!!!! Worked perfectly.

catchforshivacatchforshiva

Hi AndyLarter

 

 

you can flow this link

 

http://salesforcefoundation.screenstepslive.com/s/npsp/m/contacts/l/20091-removing-record-types-from-an-object

 

above link is clarify your question.

 

 

Thanks

Shiva

HoylesyHoylesy

Wow such a great workaround - thanks man

JSONHammerleJSONHammerle
This solution is awesome.  I had to tweak it a bit to get it to work for a custom object (which requires the custom object id instead of the standard object name)

https://na15.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=00ei0000000by6Y&tid=01Ii0000001u4iF&pn=Gold+Partner+User
Andrew HeidrichAndrew Heidrich
Hey - just wanted to chime in and say thanks for this workaround that let me get rid of a mothballed case record type that has been bugging me forever.  Also, it took me a while to get it to work until I realized that the &pn=Text+Profile+Name at the end of the URL is required (although it doesn't matter what it says, as long as the ProfileID is correct).  Anyway, THANKS!
John FlintJohn Flint
This problem still exists and this fix still works!  #flewells - thanks a lot for your post.
Leslie Collins 5Leslie Collins 5
This problem still exists and this fix still works! 
Dez CesariniDez Cesarini
So grateful for this!  It worked.
Prabin Kumar BankaPrabin Kumar Banka
This really works! Awesome! Thank you!
Debbie Van Der LindeDebbie Van Der Linde
Thank you so much, this worked a treat!
Fraidy Strauss 20Fraidy Strauss 20
Brilliant! Thank you!
Tammy Silverthorne 12Tammy Silverthorne 12
Still works, althought I can't find IDs for the profiles Partner Network and External Who so I can't get rid of the record type, in my case. 
Zachary CohanZachary Cohan
The Partner Network Profile is still breaking this for me. I can't find a way to access the id for that particular profile even through querying for it in the dev console.
DavidPalmer707DavidPalmer707
This worked perfectly. Thank you, flewells!

@Salesforce - this is beyond unaccpetable. Get it together!
Dan Kurtz 13Dan Kurtz 13
flewells' answer is still correct in July 2021! I had a bunch of profiles that didn't have any way to directly edit object permissions, and that hack worked well. I agree that it's not acceptable.
it113it113

Adding an update if anyone else needs an alternative solution - How To Delete Record Types In Salesforce (https://www.youtube.com/watch?v=iXiRieJ0QfQ&t=287s).
After an hour of trial and error, this is the only thing I could find to help me.