ReadOnlyField Vs ReadOnlyEnforced when creating Site Columns
-
16-02-2021 - |
Question
When creating a new site column inside Sharepoint Online, we have 2 options to set: ReadOnlyField and ReadOnlyEnforced.
So, what are the differences between these 2 settings?
As far as, I know ReadOnlyField means below points:
It can not be edited using the new, edit and quick edit forms.
It can be updated inside our code using CSOM (for example if we have a remote event receiver we can update the ReadOnlyField inside the code).
La solution
Please refer to the below difference of these two properties:
Read Only Field:
- The column is not displayed in the edit form.
- The column is displayed in the quick edit view but cannot be edited.
- The column is not visible inside the content type also thus, it is not revealed by an end user just by changing the content type column settings.
- The column is hidden in the SharePoint Site Column settings.
- The column can be modified through PnP PowerShell but not though PnPJS.
Read Only Enforced:
- The column is displayed in the edit form, Content types settings and Site Column settings.
- The column value can be added when a new item is created but it's value can't be changed once created.
- The column cann't be modified through PowerShell.
For more information, refer Lock SharePoint column, make field ReadOnly or ReadOnlyEnforced link.
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange