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
AKS018AKS018 

To clear multi select list chosen values through apex

Hi, 

In my visual force page i have multi select list field, In which we have available and chosen values. 

Now i have to clear chosen values from multi select  list field after every action. 

How to do it, can any one help me.

Best Answer chosen by Admin (Salesforce Developers) 
AKS018AKS018
Hi Avi, Thanks for your support,
My problem has rectified.

Actually for controlling field, it has action support. so thats why the dependent field i'e the multi select list values are staying the previous values.now i removed action support. now its working fine.

All Answers

Avidev9Avidev9


Just assign blank to it after your operation and rerender the section where the field Lies

Something like
Obj.Mutliselect__c = '';

AKS018AKS018
No its not working
AKS018AKS018
Actually that is dependent multi select list
Avidev9Avidev9
Well dependent picklist will pickup values based on there dependency. Not sure why are you not able to clear the values

Please post your code.
AKS018AKS018
Hi Avi, Thanks for your support,
My problem has rectified.

Actually for controlling field, it has action support. so thats why the dependent field i'e the multi select list values are staying the previous values.now i removed action support. now its working fine.
This was selected as the best answer