What I'm trying do is, when the user clicks on the Custom Button I want that to redirect to a Standard page in edit mode
Here is what I have done so far: In the standard page layout:
Label `Clone Testing`
Created `Custom Button or Link Edit`
Content Source: `URL`
/EmployeeClonePage?id={!Employee__c.Id}
Placed the above custom button created on the standard page layout.
So when clicked on the above custom button
I see the blank screen and the URL is still pointing to the EmployeeClonePage?id=xxxx
What I expect/want is that to refresh the page to display the new id
EmployeeClonePage Page:
<apex:page controller="EmployeeCloneController" action="{!CloneMe}">
</apex:page>
EmployeeCloneController:
public void CloneME()
{
//SOQL....
//insert got the newId
redirectMe(newId)
}
private pageReference redirectMe(Id newId) {
return new PageReference('/'+newId+'/e?retURL=/'+newId);
}
What I'm doing wrong here?
/apex/EmployeeClonePage?id={!Employee__c.Id}
, not to/EmployeeClonePage?id={!Employee__c.Id}