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
SkyWalkerSkyWalker 

Multi-picklist field selection not saving changes if selection is cleared out

Hello,
 
My visualforce page has two multi-picklist fields.  The page has two standard buttons: Save and Cancel.  I am able to save the values I selected in the multi-picklist when there are more than 1 selection but when I clear out my selections from the picklist, it does not save the values.  Could you please help me figure out how to fix this?  Please see code below for the Visualforce page.  The Entity_Account__c is a custom object which we have created.  Thank you in advance
Code:
<apex:page standardController="Entity_Account__c">
<apex:form >
<apex:pageBlock title="Entity Account">
<apex:pageBlockButtons >     
    <apex:commandButton action="{!save}" value="Save"/>   
      <apex:commandButton action="{!cancel}" value="Cancel"/>   
      </apex:pageBlockButtons>

    <apex:pageBlockSection title="Entity Account Edit">    
       <apex:inputfield value="{!Entity_Account__c.Entity__c}"/>    
       <apex:inputfield value="{!Entity_Account__c.Active__c}"/>          
       <apex:inputfield value="{!Entity_Account__c.Account__c}"/>       
       <apex:inputfield value="{!Entity_Account__c.Priority__c}" />
       <apex:inputfield value="{!Entity_Account__c.Record_Type__c}" />    
    </apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 
SkyWalkerSkyWalker
Could anybody tell me if this is a bug with Visualforce?  The multi-select picklist does not allow me to clear out my selection -- for instance, upon creation I select two values from the picklist and save.  When I got back to the record and try to remove both selections from the picklist, it does not save my changes.  I could remove one value and it will save the changes but it disallow not having any selections at all.
jwetzlerjwetzler
Yeah it's a bug.  I'll log it to my team, thanks.
SkyWalkerSkyWalker
Thank you for the response Jill :smileyhappy:-- Do you know when a fix will be in place? 
jwetzlerjwetzler
Probably not until the next release.