I'm quite new in Salesforce and I'm having some difficulties. I'm creating a VF page in order to override the NEW button for CONTACT for certain profiles. I've already done it for the EDIT button and it works (it's allowed by standard controller action).
This is the first part of my code:
<apex:page standardController="Contact" tabStyle="Contact" action="{!if($Setup.OverrideStandardButtons__c.Override__c==true, null, urlFor($Action.Contact.NewContact, Contact.Id, [retURL=URLFOR($Action.Contact.View, Contact.Id)], true))}" >
The second part (from urlFor) in not working. For example, if I'm the System administrator and I try to create a new Contact I get an error.
Is there a way to do this without any controller extension, just modifying the code?