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

Custom button in a related list to execute window.open with dynamic parameter
In an Account detail page, I created a custom button in the Opportunity related list to execute Javascript. How can I pass the (string) value of GETRECORDIDS to another s-control when calling window.open()?
Here is my Javascript:
I get an error indicating "idstr" doesn't exist.
Any help/pointer will be appreciated.
Thanks.
Here is my Javascript:
Code:
var idstr={!GETRECORDIDS($ObjectType.Opportunity)}; alert(idstr); window.open("{!URLFOR($SControl.MySControl, Account.Id, [oppIds=idstr])}","","top=100,left=100,width=400,height=400,status=yes,toolbar=yes");
I get an error indicating "idstr" doesn't exist.
Any help/pointer will be appreciated.
Thanks.
On the receiving end (an S-control page), I have to split the oppIds into an array of strings.
Now, I wonder if can do the same thing from executing Javascript to an Apex page...