I am able to get record in controller and getting the recordtypeid that I wanted to assign the record
private ApexPages.StandardController ctrl;
public FTR__c ftrObj {get;set;}
public FTR_Controller(ApexPages.StandardController controller) {
this.ctrl = controller;
this.ftrObj = (FTR__c) controller.getRecord();
this.ftrObj.RecordTypeId = Schema.SObjectType.FTR__c.getRecordTypeInfosByName().get('FTR OE Record Type').getRecordTypeId();
}
But how to set it to currentpage record??
Is there any workaround to set it to controller like: controller.setRecord(ftrObj)
?
What I want is when the VisualForce page load, the object is predefined to specific record type