function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jake HemmahJake Hemmah 

multi-picklist field update

I have a web form that passes through a multi picklist field to a case object. Problem is that they come through as comma seperated but i need them to be semi-colon seperated. i will work with the web developers to see if they can pass them through as semi-colon seperated but in the event that they can't; what would my options be to create a field update to replace the comma with semi-colon. I tried doing a field update but apparently thats not available with a multi picklist field.
Gunnam RamGunnam Ram
Hi jake,

Try this

String old = Value received from webform;
    String newStr = old.replace(',',';');
Case c = new Case();
c.multiselectpicklistfield = newStr;

I tried in my local and worked for me. Hope it will work for u as well.

Thanks,
Ram.