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
imishraimishra 

Urgent:- Recreating the standard new button

Hi,

 

I want to create standard new button for a custom object. Please tell me how can i do this.

 

Thanks..

Hussey786Hussey786

Hi Mishra,

Do you want a New button in VF page for custom object or New button is not appearing for you when hitting the tab of that custom object, your question is bit confusing.

imishraimishra

I created a visualforce tab and want to create the standard 'New' button inside that.

Please let me know how can this be implemented.

 

 

Thanks.

HusseyHussey

You should use a method for button action as follows.

 

  public pageReference newAction(){
     pageReference pg = new pageReference('/a03/e?');
     return pg;
   }

 

Here 'a03' is first three digits of your custom object record's Id.