This is how you can override the Edit action for Book__c custom object. If the record type is Alpha you will be directed to a new page, otherwise you go to the standard edit page.

<apex:page standardController="DaizyLogik__Book__c" action="{!URLFOR(
CASE(DaizyLogik__Book__c.RecordType.Name, 'Alpha', $Page.BookAlpha,
'/' + DaizyLogik__Book__c.Id + '/e?nooverride=1'),
DaizyLogik__Book__c.Id) }">

<apex:variable value=”{!DaizyLogik__Book__c.RecordType.Name}” var=”recTypeName”/>
</apex:page>

by Vladimir Martinov

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s