You need to sign in to do that
Don't have an account?
Harmoine
RecordType
How do you create a standard object say 'Contact' record of a particular RecordType say 'InternalContact' from a VF page? When I create the contact using standard controller, the default Contact record gets created not the internalContact recordtype. How do we do this cast?
Alternatively, if you don't want to give your users a choice, you can use a SOQL statement in your controller to retrieve the Id of 'InternalContact' from the RecordType table, then set it as the value of Contact.RecordTypeId.
e.g.
All Answers
Hi
If your Saving record from VF page,then you can specify the Record Type of the Contact by using
<apex:inputfield>.Then you can select the Record type and then save the record.
Thanks
Alternatively, if you don't want to give your users a choice, you can use a SOQL statement in your controller to retrieve the Id of 'InternalContact' from the RecordType table, then set it as the value of Contact.RecordTypeId.
e.g.
Thank you so much!! It worked!! I have been on it for hours. Thankyou!!!