You need to sign in to do that
Don't have an account?
Kiran456
Adding button to standard layout
I have a button create patient on standard layout which is supposed to excecute some logic and take user to the detail page of patient record. I have extended standard controller and added that button on the page but when I click on that button a new page is opens. I dont want to open a new page. I want that after executing controllers logic. It should take user to the detail page of newly created patient without opening any blank page initially. Any pointers would be of great help. Thanks in advance.
Example
VF Page:
<apex:page controller="MyController" action="{!redirectMe}">
</apex:page>
Controller:
public class MyController {
public pageReference redirectMe() {
// Perform your logic here
// and Redirect user to the requested page
}
}