public with sharing class CreateSolCloneController { public ApexPages.StandardController solController; public Solution_Programme__c objsol {get;set;} public CreateSolCloneController(ApexPages.StandardController stdController) { solController = stdController; this.objsol = (Solution_Programme__c)stdController.getRecord(); } public PageReference checkRecordTypeEDIT() { PageReference page; if(this.objsol.id != null) { page = new PageReference('/'+this.objsol.id+System.label.solClone_url+this.objsol.id); } return page; } }