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
FabiFabi 

Unable to change record type

Hello, I am stuck on something and it's driving me crazy. Would appreciate our help. we have a few  Account record types  and everytime I create a record, it keeps reverting to the default record type. I check all associated workflows, triggers, page layouts, permisisons. 

Thank you!
Ryan GreeneRyan Greene
Is the Record Type Active?
Setup>Customize>Accounts>Record Types>>This screen will show all Record Types Associated to Accounts and if theyre Active or not
Margarida D CostaMargarida D Costa
Hi Fabi, did you check what the dfault record type is for the profile you are logging in with? The default record type is used when creating a new record.


.default recordtype is set to 'test' for Opportunity in the Profile settings
FabiFabi
I am sorry for the  late reply, @Ryan Greene i checked the record types and they are all active. @Margarida D Costa, yes the record type  we are stuck on is the default record type for all profiles. However they are still prompted to select a different record type  at record creation and despite selecting a different record type, the record is created with the default record type. This is really puzzling. 
Ryan GreeneRyan Greene
Thats very weird! Are you using Classic or Lightning?
From Classic after you select 'Record Type B' check the the URL for the Record Type ID to see if it matches the record type Id for 'Record Type B'. For example in my org I select Prospect/Client as the record type then click Continue and the URL will look like this: my.salesforce.com/001/e?retURL=%2F001%2Fo&RecordType=012410000006bPi&ent=Account

After "RecordType=" in the URL it displays the Id, make sure this Id matches whatever you selected. Also, lower on my add new Account page it does confirm my Record Type as Prospect/Client.

One more thing to try if the above replaces that Record Type Id with the one you don't want is to grab the Id of the Record Type you do want and insert it in the URL, press enter, see what happens!

To obtain the Record Type Id go to the Record Types under Account and select the one you need. Look in the URL for the Id, it will say "id=0124......"
FabiFabi
Thank you @ Ryan Greenee, i just did as you suggested and everything looks good and matches untill i hit the save record button and it's saved with the wrong record type. The id for all the record types differ  in the  URL at record type selection and on the record page before saving. it's very weird. 
FabiFabi
Turns out it was a Custom Setting on the  account object, don't quite understand yet how it works but atleast we got it fixed. Thank you all for your help.