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
rathi007rathi007 

not work

i want to oveerride new button

public class overrideclass {
public overrideclass(ApexPages.StandardController controller) {

}

public pagereference myAction()
{
Integer dd = date.Today().day();
Integer mm = date.Today().month();
Integer yyyy = date.Today().year();
String st=mm+'/'+dd+'/'+yyyy;
pagereference pf =new pagereference ('/a10/e?00Nf0000000HlEX='+st+'&00Nf0000000HlG3='+st+'&00Nf0000000HlF5='+st);
return pf;
}

}

 

 

 

not return create record

risharisha

hi,

  you need to change the page tag like this

<apex:page standardcontroller="Corresponding object" extensions="your class name">

 

And then you need to change the Custom Object Definition Detail,such as

 

 

Custom Object Definition Detail-->Buttons, Links, and Actions-->edit the new button and select the visualforcepage radio button and in drop down list you need to choose required vf page.

Ashish_SFDCAshish_SFDC

Hi Rathi, 

 

If the Object is a child Object, it should have the Parent Object Standard Controller. 

 

Regards,

Ashish

 

 

rathi007rathi007

but it perform recursive