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
dmchengdmcheng 

Setting Web-to-case record type?

In my web-to-case form, I want to specify a record type.  See html line below.  However, when I submit the form, the case record type is still set to the default record of the default case owner.  Do I have the correct syntax for the html line?  I checked the Support Settings and it is not set to override the type with the owner's default.

<input type=hidden name="RecordTypeId" value="01280000000G4N7AAK">

Best Answer chosen by Admin (Salesforce Developers) 
PragadheeshwariPragadheeshwari

Hi, Try this.... Instead of RecordTypeId use recordType... pass like this. its worked for me....

 

"<input type=hidden  id="recordType" name="recordType" value="012800000007ecd">"

All Answers

PragadheeshwariPragadheeshwari

Hi, Try this.... Instead of RecordTypeId use recordType... pass like this. its worked for me....

 

"<input type=hidden  id="recordType" name="recordType" value="012800000007ecd">"

This was selected as the best answer
dmchengdmcheng

Thanks that worked, though it turns out I was also using the 18-character ID instead of the 15-char ID.

success22success22

Hello,

 

I am facing same problem. And i have used format as solution. Case is creating from web but record type is not getting selected on records. Can you please help me?

 

<input type="hidden" id="recordType" name="recordType" value="01290000000RzRW"/> <!-- Case Record Type ID -->
Sunil pal 29Sunil pal 29
Its working fine for 15 charcter Id but not for 18 characters. Is theer any specific reason 18 character is not working.

 
Yahor VolkauYahor Volkau
REMEMBER: to keep the record type on the submitted form make sure that the option "Keep the existing record type" is selected as your Record Type Setting:
- In Classic, Setup | Customize | Cases | Support Settings 
- In Lightning, Setup | Feature Settings | Service | Support Settings
Wani TawseefWani Tawseef
@success22 :  Please check if you have access to recordType at the profile level . Use 15 digit recorttype id and it will work .