+ Start a Discussion
joseph keuler 1joseph keuler 1 

Add new button to visualforce page

Hi, 

I'm creating a visual force page that shows a new default list filter to override the standard page of a custom object.  How can I get the "NEW" button such that I can open a new form to create a new record.

<apex:commandLink action="{!URLFOR($Action.Fiscal_Year__c.NewFiscal_Year__c)}" value="Create New Fiscal Year"/>
         <apex:commandButton action="{! new}" value="create new fiscal year"/>

It seems creating a controller would be overkill because I simply want to go to the add fiscal year form vs adding one directly from this form.  Any ideas? 
Best Answer chosen by joseph keuler 1
joseph keuler 1joseph keuler 1
Looks like the issue was appending the customobject name on the New method.

<apex:commandButton action="{!URLFOR($Action.Fiscal_Year__c.New)}" value="Create new Fiscal Year"/>