/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
http://bit.ly/cj450K //Get a reference to the Custom Object and gets its Key Schema.DescribeSObjectResult result = customObject__c.sObjectType.getDescribe(); //navigate to the View Page PageReference pageRef = New PageReference('/' + result.getKeyPrefix() + '/o'); pageRef.setRedirect(true); return pageRef;