Posted By

d3developer on 08/10/10


Tagged


Versions (?)

boyd_r URL Navigation for Custom Objects


 / Published in: Other
 

  1. http://bit.ly/cj450K
  2.  
  3. //Get a reference to the Custom Object and gets its Key
  4. Schema.DescribeSObjectResult result = customObject__c.sObjectType.getDescribe();
  5.  
  6. //navigate to the View Page
  7. PageReference pageRef = New PageReference('/' + result.getKeyPrefix() + '/o');
  8. pageRef.setRedirect(true);
  9. return pageRef;

Report this snippet  

You need to login to post a comment.