
Force.com Cookbook Sample Code
Chapter 7: Customizing Buttons and Links - Passing Parameters into a Custom Button or Link
To download all the code samples, access the Cookbook. -
This s-control shows how a parameter can be passed from a button or link to another page.
<html>
<head>
</head>
<body>
<script type="text/javascript">
window.location.href = "{!URLFOR($SControl.myScontrol, Account.Id, [action="attach"])}";
</script>
</body>
</html>
Sample code provided by salesforce.com. All rights reserved.