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

URLFOR doesn't like query parameters
Hello,
I have been trying to get a custom button to work, but had to resort to creating an s-control and assigning that to the button. Not a big deal but wondering what the syntax is for URLFOR since the query parameters do not seem to be the same as the JS redirect function.
The code that works fine:
The OnClick JavaScript code which doesn't even compile - a syntax error is thrown specifically on the query parameter name "00N70000001ytZ4"
Thanks!
Sara
I have been trying to get a custom button to work, but had to resort to creating an s-control and assigning that to the button. Not a big deal but wondering what the syntax is for URLFOR since the query parameters do not seem to be the same as the JS redirect function.
The code that works fine:
Code:
<script language="JavaScript"> function redirect() { parent.frames.location.replace("/a01/e—retURL=%2F{!Author__c.Id}&00N70000001ytZ4=Your name") } redirect(); </script>
The OnClick JavaScript code which doesn't even compile - a syntax error is thrown specifically on the query parameter name "00N70000001ytZ4"
Code:
window.parent.location.href="{!URLFOR($Action.Publication__c.New, null, [retURL=URLFOR($Action.Author__c.View, Author__c.Id),00N70000001ytZ4="Your name"], true)}";
Thanks!
Sara

In most xml and http technologies where there is key/value pairs or tags and values, key names and tag names aren't allowed to start with a number. That is likely where the problem lies.