You need to sign in to do that
Don't have an account?

Trouble directing a URL to a Tab
Hi,
I did an override of the New Button in Account Object, with my custom HTML SControl. The SControl simply checks unique Fice (our internal primary ID), and creates an account if the fice is unique.
When the fice is left empty, the user is simply taken to the new accounts page. I am using the following code to perform this action.
window.parent.location.href = "{!URLFOR($Action.Account.New, Account.Id, [retURL=URLFOR($Action.Account.New, Account.Id)], true)}"
The problem is, that if a valid fice and account name is entered, and an account created, I want the user to be redirected to either the edit page of the new account, or to the Account Tab. I tried the following options,
window.parent.location.href = "{!URLFOR($Action.Account.Tab, Account.Id)}"
and window.parent.location.href = "{!URLFOR($Action.Account.Edit, Account.Id)}"
but the page is not redirected to either the Tab or the edit page. It remains in the html page of scontrol.
Thanks,
Saania
To make sure that the window will be redirected i typically use:
top.window.location="myURLString";
This way it doesn't matter if it's called from an s-control or from the main app (custom button, link, etc.). It might not fix it... but worth a shot.
Thanks for the replies, the AccountId not being there does make sense. but shouldnt redirecting to an Account Tab be oblivious of the AccountId? Is there a work around to accomplish this?
Thanks,
Saania