0

I have the following issue:

I have two record types on Asset object, let's call them "RecordType1" and "RecordType2". As "RecordType2" is not in use, I want to get rid of it. But when I try to delete it, I get the following error:

Only inactive record types can be deleted. Deactivate the record type to allow deletion.

This record type RecordType2 cannot be deleted because the following profiles use this record type as default.

Below, "Identity User" profile is listed. Identity User is a standard Salesforce profile connected to User License "Identity".

The issue is that when I access its Object Settings, Asset is not listed there. I can't change anything for it. I tried to retrieve it using workbench, to change it directly in XML, but the record type is not listed there too.

So the record type is visible as "Default" when I try to delete it, but I can't see it anywhere in the settings and can't change it.

Do you know what caused such behavior, and what can fix it? Thanks in advance for any help!

2
  • Does the approach in post help? Commented Apr 22, 2022 at 10:01
  • 1
    It actually works! Thanks @Swetha! I'm going to copy the instruction here with a reference to the original post, so others can see it. And I'll change one thing, as "Enable Enhanced Profile User Interface" is in another place now.
    – kwojt
    Commented Apr 22, 2022 at 11:15

2 Answers 2

2

The solution is very similar to the one described in the post linked in Swetha's comment, which was originally posted by Karanraj Sankaranarayanan. I'll copy it here and change some things, as some settings were moved in the Setup.

  1. Go to Setup -> User Management Settings and deselect "Enable Enhanced Profile User Interface".
  2. Go to Setup -> Profiles -> System Administrator. Navigate to Record Types and click the Edit Link on the Asset. At this point you will be at the Edit Record Type Settings Page for the Object.
  3. Copy the URL from the address bar on your browser and paste it into a notepad: https://naX.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=xxxxxxxxxxxxxxx&tid=Opportunity&pn=System+Administrator&retURL=/xxxxxxxxxxxxxxx
  4. Go to Setup -> Profiles -> Identity User.
  5. Copy the 15 digit Salesforce Id from the URL in the address bar of your browser: yyyyyyyyyyyyyyy
  6. You are now going to replace the id in the Edit Record Type Settings Asset Page (the first id number right after the "jsp?id=" in the URL) with the id from the Identity User. This: https://naX.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=xxxxxxxxxxxxxxx&tid=Opportunity&pn=System+Administrator&retURL=/xxxxxxxxxxxxxxx
    Should now look like this: https://na5.salesforce.com/setup/ui/profilerecordtypeedit.jsp?id=yyyyyyyyyyyyyyy&tid=Opportunity&pn=System+Administrator&retURL=/xxxxxxxxxxxxxxx (xxxxxxxxxxxxxxx was replaced with yyyyyyyyyyyyyyy)
  7. Now take the modified URL and place it in the address bar of your browser and hit enter. This will seem to have taken you to the System Administrator's edit page but you are in the right place.
  8. You will now be able to remove the value by highlighting it and selecting remove. Switch the Default record type to whatever you like and hit save. All you need to do now is repeat this for any other Profiles in which it is necessary, then Deactivate and Delete the Record Type.
2
  • The solution above only works if you are using Salesforce Classic mode. Commented Jan 20, 2023 at 23:24
  • For stuff like this, I always use Classic as the URLs are so much more hackable. Lightning is terrible in this regard - super URL-unfriendly.
    – Semmel
    Commented Jun 4 at 12:33
0

I found an alternative solution without the UI.

  1. Go into your IDE or tool of choice - then download and open the problematic profiles.
  2. Search for <recordTypeVisibilities>.
  3. In those tags search for the <default>true</default> for your record type.
  4. Set it to false for this record type and add true to some other record type of that object.

Alternatively, you can set default to false everywhere in that object - but then you would also have to set <visible> to false for all record types of that object. This will reset the option to the master record type.

Deploy the profile(s) back to you Org.

4
  • 1
    Nope, won't work. As I mentioned, for this specific standard profile, these settings are not present in the retrieved XML file. Removing it with IDE is a standard way, but I didn't find a way to do it for Identity User, as it behaves different than other profiles.
    – kwojt
    Commented Feb 22 at 7:26
  • Interesting. I also had problems with the Identity User and now I even have a profile that I cannot access at all. I will come back to this.
    – Semmel
    Commented Feb 22 at 23:47
  • I just hit this problem with the Platform Integration User. I created a new record type and assigned it as the default instead of an old record type. However, I still couldn't deactivate it as it was still the default for the Platform Integration User. Interestingly, this profile doesn't even allow setting any allowed record types for accounts. I tried your URL hack from above and while it helped me change the default record type it didn't change that the system views it as used. So weird.
    – Semmel
    Commented Jun 4 at 12:52
  • It was a similar error with a hidden profile: salesforce.stackexchange.com/questions/422612/…
    – Semmel
    Commented Jun 4 at 13:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .