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
Dev_AryaDev_Arya 

what is the use of 'Restrict picklist to values defined in the value set' checkbox?

In Custom Object picklists, we have an option to check/uncheck, 'Restrict picklist to values defined in the value set'. If I have this unchecked, the user should be able to add free text, but that is not the behavior I have seen, then what is the use of this setting? 
Best Answer chosen by Dev_Arya
Dev_AryaDev_Arya
Hi Agustin,
Sorry for the late reply but I have my answer.
The checkbox only controls the behavior of the updates via the API. If the checkbox is unchecked, and if the free text added via the API update, then the free text value is added to the picklist as an inactive value. 
For the UI, free text entry is not possible. 
Thanks,
Dev

All Answers

Agustin BAgustin B
Hi Dev_Arya if you have that option checked if the user adds free text the DML operation will fail. Without that checked any free text should be added as a new option.
Which is the behaviour you have been seing?

If it helps please like and mark as correct, it may help others asking the same.
Dev_AryaDev_Arya
When the checkbox is unchecked, It is not letting me add any new values as free text. 
Agustin BAgustin B
Hi, show me the configuration of the field to see if everything is right.
Also, which is the error you are receiving when failing the dml operation? Please show me.
Thanks.
Dev_AryaDev_Arya
Hi Agustin,
Sorry for the late reply but I have my answer.
The checkbox only controls the behavior of the updates via the API. If the checkbox is unchecked, and if the free text added via the API update, then the free text value is added to the picklist as an inactive value. 
For the UI, free text entry is not possible. 
Thanks,
Dev
This was selected as the best answer