I'm sending some parameters to custom controller of my object, which should be populated on multiselect picklist. In controller I'm creating a new Page Reference, where I put all parameters by using
myPage.getParameters.put('fieldId', 'paramValue'). This is for creating new instance of object with some fields preselected upon creating on creation page.
I need to set multiple values into multiselect field, and I'm trying to do it by joining all needed values with
;, but SF doesn't understand this.
Then, I'm put into Page Reference constructor URL with all values for this field
'myId=val1&myId=val2'. This also doesn't work.
Finally, I'm trying to put all into one parameter and send it as one value, like:
myPage.getParameters.put('fieldId', 'val1&fieldId=val2'), but here I'm facing the problem of encoding all letters, including
& which definitely should be kept as usual. Can anyone suggest how to do it through page reference?