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
taaataaa 

Override new button

Hello,

 

My business requirement is "when user clicked on "New Button" on Account, then it should redirect to some other page", pls help me with the VF code for this action.

Thanks,

 

asish1989asish1989

Hi

   make a vf whose standard controller is Account as you want to overide New buttom of Account object .

   Go to setUp-customize-Account-Bottom and links-New

   click edit next New bottom

   choose radio bottom overide with visualforcepage

   choose the page name

  save iT

  <apex:page StandardController ="Account" extension = "your class">

 

 

Did this post answers your question If so please mark it solved

 

thanks

asish 

taaataaa

Thanks, but I want code for VF page, controller I managed, but not getting VF.

asish1989asish1989

Hi

    Try inthis way...

     <apex:page StandardController ="Account" extension = "your class">

     <apex:form>

               <apex:pageBlockSection>

                 // your information ...

                  ....................................

                    ..................

             </apex:pageBlockSection>

      </apex:form>

</apex:page>

Did this post answers your question if so please mark it solved

 

 

Thanks

asish

Vishal GuptaVishal Gupta

u need to include the standard controller and if u wana do some extra customization the include extensions also.
<apex:page standardcontroller="Account" extensions="">

 

your Code

 

</apex:page>