function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Meryem FRQMeryem FRQ 

How to redirect from a standard page ?

I need to overwrite the standard edit page for a certain recordType of events. Any ideas how to redirect to the new VF page ?
Best Answer chosen by Meryem FRQ
ShashankShashank (Salesforce Developers) 
Please see if this helps:

All Answers

ShashankShashank (Salesforce Developers) 
Please see if this helps:
This was selected as the best answer
Meryem FRQMeryem FRQ
Perfect. Thank you so much !!
Vishal NegandhiVishal Negandhi
The above blog is a good option, but you can also do it by creating a new custom edit button and adding it on layout and removing the standard edit button. 
Small example:
- the below code is for an edit custom button, it redirects to new account page for a recordtype and for all others, it redirects to a new contact page

var recTypeId = '{!Account.RecordTypeId}';
alert(recTypeId );
if(recTypeId == '01290000001ADgY'){ alert('if');window.location="/001/e"; }
else {