Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
I do not understand this solution.
How do you set the recordtype id via visualforce.
Here is my code:
<apex:page standardController="Case"> <apex:form > <apex:pageBlock title="Edit Case for {!$User.FirstName}"> <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> </apex:pageBlockButtons> <apex:pageBlockSection > <apex:inputField value="{!case.subject}"/> <apex:inputField value="{!case.Quick_Ticket_Name__c}"/> <apex:inputField value="{!case.status}"/> <apex:inputfield value="{!case.Quick_Ticket_check__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
Where do I set the value of the record type?
Sham wrote:Before saving the recordyourobject.RecordTypeId = "Your recordType Id";
I am doing the exact thing. I log the recordType value before saving and it is correct, but it is not changed after saving the record.
I was changing RT in apex controller class, then I moved it to a trigger, none of which solved my problem.
Before saving the record
yourobject.RecordTypeId = "Your recordType Id";
All Answers
Before saving the record
yourobject.RecordTypeId = "Your recordType Id";
I do not understand this solution.
How do you set the recordtype id via visualforce.
Here is my code:
<apex:page standardController="Case"> <apex:form > <apex:pageBlock title="Edit Case for {!$User.FirstName}"> <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> </apex:pageBlockButtons> <apex:pageBlockSection > <apex:inputField value="{!case.subject}"/> <apex:inputField value="{!case.Quick_Ticket_Name__c}"/> <apex:inputField value="{!case.status}"/> <apex:inputfield value="{!case.Quick_Ticket_check__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
Where do I set the value of the record type?
I am doing the exact thing. I log the recordType value before saving and it is correct, but it is not changed after saving the record.
I was changing RT in apex controller class, then I moved it to a trigger, none of which solved my problem.