+ Start a Discussion
astroastro 

CommandButton onClick returning "missing ) after arguments List"

Not sure where I am missing this arugment or where an escape character should be used?  Any help would be greatly appreciated.

 

Thank's

 

Here is the line in question:

 

<apex:commandButton value="New Objective" onclick="window.parent.location.replace('/a0y/e?retURL={!Account_Plan_vod__c}&CF00N70000001xEWq={!Account_Plan_vod__c.Name}&CF00N70000001xEWq_lkid={!Account_Plan_vod__c.ID}');" /> 

astroastro

Figured it out.  If the name of any "Account_Plan_Vod__c" record has a character that is unescaped it will break and return that error.

 

Offhand does anyone know a regex to escape these troublesome char's in a string :)?

ThomasTTThomasTT
There is a new functio URLENCODE, so {!URLENCODE(Account_Plan_Vod__c)} should work.