I have a custom button 'Convert to Quality case'. On click, it redirects to a VF page. I want to open the VF page in edit mode so that I can edit the 'Case record type' but I can't edit the Case record type field.

I have tried using this code in my VF page

<apex:outputLink value="{!URLFOR($Action.MyObject__c.Edit, record.Id)}">

this is the VF page that pops after clicking on Convert to Quality Case


You can specify a specific record type on the URL:

<apex:outputLink value="{!URLFOR($Action.MyObject__c.Edit, record.Id, [RecordType='012XX00000XXXXX'])}">

The record type field is never directly editable, because it alters the page layout, picklist values, etc.

  • @GargiGupta it won't be editable; the record type must be selected before the edit page loads. – sfdcfox May 30 '19 at 22:33
  • <apex:page standardController="Case" extensions="SingleCase_Quality_BasePage_Controller" lightningStylesheets="true" > <apex:outputLink value="{!URLFOR($Action.Case.Edit, record.Id, [RecordType='0126000000058u3AAA'])}"/> <apex:form > I edited the code, still no luck. – Gargi Gupta May 30 '19 at 22:34
  • Isn't the record type already selected? As when I click on the Convert To Quality button, it is redirecting to the VF page and it shows the 'Quality Management Case Record Type'. – Gargi Gupta May 30 '19 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.