You need to sign in to do that
Don't have an account?
Lakshmi S
How to redirect the visualforce page to record detail page after clicking on Cancel Button ?
Hi Team,
How to redirect the visualforce page to record detail page after clicking on Cancel Button ?
Controller Class
-------------------------
Please let me know any one.
Regrds
Lakshmi
How to redirect the visualforce page to record detail page after clicking on Cancel Button ?
Controller Class
-------------------------
public with sharing class ControllerClass { public static String oppid; private ApexPages.StandardController sc{get;set;} public Opportunity opp = new Opportunity(); public ControllerClass(ApexPages.StandardController sc){ this.sc = sc; oppid = ApexPages.currentPage().getParameters().get('oppid'); //system.debug('------'+oppid); opp =[select id,name,Account.name from Opportunity where id =:oppid limit 1]; } } Public PageReference Cancel(){ PageReference pr = new PageReference('/'+Schema.SObjectType.Opportunity.getKeyPrefix()+'/o'); return pr; } }How to redirect this page to opportunity record detail page.
Please let me know any one.
Regrds
Lakshmi
Please try the below code.
Thanks,
Yogesh
All Answers
Please try the below code.
Thanks,
Yogesh
Thanks for your quick response.
Regards
Lakshmi.