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).

Was it helpful?

Solution

Please refer to the below difference of these two properties:

Read Only Field:

  1. The column is not displayed in the edit form.
  2. The column is displayed in the quick edit view but cannot be edited.
  3. 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.
  4. The column is hidden in the SharePoint Site Column settings.
  5. The column can be modified through PnP PowerShell but not though PnPJS.

Read Only Enforced:

  1. The column is displayed in the edit form, Content types settings and Site Column settings.
  2. The column value can be added when a new item is created but it's value can't be changed once created.
  3. The column cann't be modified through PowerShell.

For more information, refer Lock SharePoint column, make field ReadOnly or ReadOnlyEnforced link.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top