You need to sign in to do that
Don't have an account?
heiritic
set retURL at URLFOR with link
I need help about setting link at URLFOR. Can salesforce do that? I want to use that scontrol when I click 'save' at opportunity and point it to another url. The use of URLFOR I know is with retURL :
window.parent.location.href="{! URLFOR($Action.Opportunity.Edit,Opportunity.Id,
[retURL=URLFOR($Action.Opportunity.View,Opportunity.Id)],true)}";
I can't override button 'save', so I override button 'edit' at opportunity. If only I can use trigger and set url to location I want. Anyone has idea or suggestion? It would be appreciated.
window.parent.location.href="{! URLFOR($Action.Opportunity.Edit,Opportunity.Id,
[retURL=URLFOR($Action.Opportunity.View,Opportunity.Id)],true)}";
I can't override button 'save', so I override button 'edit' at opportunity. If only I can use trigger and set url to location I want. Anyone has idea or suggestion? It would be appreciated.
Code: I hope this is of aid to you...
Message Edited by JTec on 08-14-2007 05:40 AM
thanx
Code: Just include the "protocol" ("http%3A//") as part of the retURL, and it'll make you leave Salesforce.
~ sfdcfox ~
It's still not right in me. this is my full code :
<script type="text/javascript">
window.parent.location.href="{! URLFOR($Action.Opportunity.Edit,Opportunity.Id,[retURL="http%3A//www.yahoo.com/"],true)}";
</script>
it leads me to a non-exist url. This is the url I get :
https://na5.salesforce.com/50070000003T7Fs/http%3A//www.yahoo.com/
It looks like it still return to salesforce site..Is there something missing in my code? If I don't use 'true', it will loop forever. Any more ideas? Or can I use trigger and set the scontrol or url?
thanx,
edwin
Thanx guys. But How if I want to open the url with new window? any suggestion?
I have turned off my popup blocker too. Why it doesn't work? Any suggestions or advices?
here is the real code. the code before doesn't have the bracket at the end before the semicolon so don't be confuse with the code before.But it still doesn't want to open the new window..any advices?I appreciate that.
It can launch to another url with new window after the click save. I use another scontrol that has window.open in it so it will launch the new window. But Why does the first window become blank? It should go to Request.retURL right? Am I wrong? any advice would be appreciated. I'm so confused...
thanx,
edwin
I found the following works just fine
<apex:commandButton value="Edit" onclick="window.parent.location.replace('{!URLFOR($Action.Opportunity.Edit, Opportunity.Id , [retURL=Opportunity.Id])}');"></apex:commandButton>
Hello @Anesh M
Thank you for the solution you provided.
But its not opening the window in lightning theme. Please let me know how we can use this in lightning .
I want to open the edit page in lightning view and and redirectback it to the previous page.