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
DS777DS777 

Redirection to current page

I have 3 tabs on my page. After editing a record(followed by save)  or on cancel on tab 2  how to return back to tab 2 as
Current behaviour is that  you get re-directed to tab 1 which is the default tab.
Here save and cancel are standard buttons.
Ron HessRon Hess
your controller will probably have to set the current tab, rather than a default.
you may have to create your own save and cancel buttons that perform this defaulting and then call the standard controller save() or cancel().
DS777DS777

how to set  the current tab in the controller?

Create new buttons is not a option as I am using the standard SF layout.

Ron HessRon Hess
i have not tried this , but

selectedTab="name2"

would be

selectedTab="{!WhichTab}"

then in your controller,

public string getWhichTab() {  // decide which name to return
    return "name2" or "name1"
}
DS777DS777

Hi Ron,

 

Can you please provide a working example as I failing it to work.

 

 

Regards