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
sfdcrajsfdcraj 

urlfor to call "new contact" Page from visualforce page with Account standard controller

Hi,

I want to use a custom button which takes the user to new contact page . My visualforce page is based on Account standard controller. I am trying to as below , but it give me and errror.
Error: Field $Action.Contact.New does not exist. Check spelling 
Error: Field $Action.Contact.New does not exist. Check spelling.



<apex:page standardController="account" extensions="AccountDetailController">
<apex:commandButton action="{!URLFOR($Action.Contact.New)}" value="New Contact">
</apex:page>

How can i access the action method of contact from account standard controller visualforce page.??

Regards,
raj
MJ Kahn / OpFocusMJ Kahn / OpFocus
Change it to $Action.Contact.NewContact. If you look under Setup | Customize | Contacts | Buttons & Links, you'll see that the "new" action is actually named "NewContact," not just "New."
Ilya IvanovskiyIlya Ivanovskiy
<apex:outputLink value="{!URLFOR($Action.Contact.NewContact)}" target="_blank">
                Create New Contact
            </apex:outputLink>
Create New Contact 
<apex:outputLink value="{!URLFOR($Action.Account.New)}" target="_blank">
    Create New Account
</apex:outputLink>
create a new account