I'm stuck and want a way to solve a problem . The requirement is when i click on custom button it should redirect me to the Contact page WITH auto populate Account field. I've reach with the redirect and stucked with auto populate . How do i do it ? Thanks in advance. Any modifications with my code would be helpful.
<apex:page standardController="Contact" extensions="NewContact">
<apex:form >
<apex:pageBlock title="New Contact " mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!Cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Contact Details" columns="2">
<apex:CommandButton action="{!NewImplementation}" value="New Implementation" />
</apex:pageblocksection>
== Class==
public class NewContact {
public NewContact(ApexPages.StandardController controller) {
}
public PageReference NewImplementation() {
PageReference secondPage = new PageReference ('/003/e');
secondPage.setRedirect(true);
return secondPage;
}
}