1

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

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.