You need to sign in to do that
Don't have an account?
Lakshmi S
How to redirect the page to custom object after clicking on Cancel button?
Hi Team,
How to redirect the custom vf page to custom object after clicking on Cancel button?
Thanks.
Lakshmi
How to redirect the custom vf page to custom object after clicking on Cancel button?
public with sharing class HighRiskSuccessFactorsCls { public High_Risk_Success_Factors__c hrsf {get;set;} ApexPages.StandardController con; public HighRiskSuccessFactorsCls(ApexPages.StandardController sc){ con=sc; } public PageReference saveNew() { PageReference pr; try{ con.save(); Schema.DescribeSObjectResult describeResult = con.getRecord().getSObjectType().getDescribe(); pr = new PageReference('/' + describeResult.getKeyPrefix() + '/e'); pr.setRedirect(true); return pr; }catch(Exception e){ ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, e.getMessage())); return null; } } Public PageReference doCancel(){ PageReference pageRef = new PageReference('/apex/High_Risk_Success_Factors__c?id='+hrsf.id+'&Sfdc.override=1'); pageRef.getParameters().put('tab','High Risk Success Factors'); return pageRef; } }Please let me know how can i redirect to custom object tab.
Thanks.
Lakshmi
Return this Page Reference in your cancel controller method
This will redirect to the object tab.
Thanks
Saket Sharma
All Answers
Try like this, Best Regards
Sampath
Return this Page Reference in your cancel controller method
This will redirect to the object tab.
Thanks
Saket Sharma
Thnaks for your reply.
How to override the standard clone functionality?
Thanks.
Lakshmi.
To override the standard clone functionality you have to go the object page and go to Buttons Links and Actions underneath it you will find a row for clone as I attached the screenshot below please have a look, click on edit in clone, override it with your vf page.
if it dosen't solve your problem then please let me know.
Thanks
Saket Sharma