Skip to main content

Posts

Showing posts with the label Visualforce

Salesforce Validation Error: Value is not valid error

 When the Visualforce page is submitted, sometimes we can see the error " Error: Validation Error: Value is not valid "   This is because when the form is submitted to salesforce server, The picklist value that is being submitted, will be checked with the list of available values in the server at that time. If there is no matching entries, This error can be thrown. If you are using picklist in the page, Make sure that 1. The list of available picklist values always include the picklist value that is selected. 2. If you are using the getter to populate the picklist values, The getter will be always called before form submission which could bring the different set of list values than the values that were available at the time picklist value selection. So instead of using getter, you can use constructor or action method to get the list of values. 3. If the picklist value contains multiple consequtive spaces (ex. Internal   User), When it is rendered as HTML, The html supres