You need to sign in to do that
Don't have an account?
URLFOR issue
Hi,
I have a custom button on the account page which executes some javascript and redirects to another website.
On return I want it to return to a specific opportunity. I can return to the account record without any issues (see below):-
window.location.href = 'http://www.google.com&retURL={!URLENCODE('https://cs1.salesforce.com' + URLFOR($Action.Account.View, Account.Id))}
But when I change the Action to Opportunity I recieve "Invlaid parameter for function URLFOR" (code for this is below)
window.location.href = 'http://www.google.com&retURL={!URLENCODE('https://cs1.salesforce.com' + URLFOR($Action.Opportunity.View, Account.OppID__c))}
Is it not possible to use the URLFOR function for this scenario?
Any help would be great!!
Thanks
Pete
If you have defined a relationship between the account and opportunity objects you can use the relationship name like so: Account.OppID__r
~Tyler
Hi,
It still wont let me use $Action.Opportunity.View on the account record?
I get "Invlaid parameter for function URLFOR" ???
window.location.href = 'http://www.google.com&retURL={!URLENCODE('https://cs1.salesforce.com' + URLFOR($Action.Opportunity.View, Account.OppID__r))}
Thanks