+ Start a Discussion

Are you having issues with missing command link parameters? This might be the reason.

FYI Post.


I was trying to pass multiple parameters on a command link. I had 3 param tags nested inside an command link. 


Sometimes I was getting all three parameters and sometimes I was getting the first one alone. Puzzled. Went thru this discussion board. Couldn't find anything. After some digging, this is what I found.


The values that you try to pass as parameters should NOT have any comma(,) in it!!!!! If you have it, then it messes the parameters list. Even if you use assignTo, it will not work.


For example,


<apex:commandLink action="{!doSomething}">

<apex:param name="p1" value="{!account.Name}">

<apex:param name="p2" value="{!account.Region__c}"> 



 As long as account name does not have a comma in it, you should be fine. If it does, then you will get the substring before the comma as p1 and p2 will be null. 


Sorry I don't have a solution yet. Thinking of stripping out the comma before It gets rendered in the VF page. 


I think the Best solution would be for salesforce to fix the translation logic for the param tag. 

If you haven't already done so I would recommend submitting a suppert case to be sure this bug is logged.
I haven't opened a case yet. But, planning on doing it.