Whenever if you want to redirect to the list view page or the home of the custom object or the standard object from a visualforce page try like this along with pagereference,
Schema.DescribeSObjectResult result = Standard/custom_object__c.SObjectType.getDescribe();
PageReference pg = new PageReference('/'+ result.getKeyPrefix()+'/o');
return pg;
Schema.DescribeSObjectResult result = Standard/custom_object__c.SObjectType.getDescribe();
PageReference pg = new PageReference('/'+ result.getKeyPrefix()+'/o');
return pg;
No comments:
Post a Comment