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

Return after delete

This should be an easy one...
When you delete an account from the console, you are 'returned' to the console.  When you delete an account from a list view on the account tab, you are 'returned' to the list view.  I have created an Scontrol that overrides the account delete button.  How can I mimic this functionality so that the user is 'returned' to the page that they clicked delete on?
Non-working example:  window.history.go(-2) then refresh()
Any ideas???
Ron HessRon Hess
look in the query paramaters that you get when your account delete button is called, you are looking for retURL, you shoudl be able to get that , and use that when your button is done to know where to go.
Use something like this in the S-control's JavaScript to re-direct back to the Account tab after deleting:

this.parent.location.href= "{!URLFOR($Action.Account.Tab, $ObjectType.Account)}";