0

I want to change the default value of a site column and update all lists that contains that site column, with the new default value.

I already found how to change the default value with REST API, but I cannot find how to update all the lists with the new default value. This is the code I use for updating default values: enter image description here

I already tried 'Update':true but I get the following error:

The property 'Update' does not exist on type 'SP.FieldText'. Make sure to only use property names that are defined by the type

1 Answer 1

0

The Field type in the SharePoint Client Object Model has a method named updateAndPushChanges that commits changed properties of the field and optionally propagates changes to all lists that use the field. However, it appears that this method has not been implemented in the SharePoint REST API.

SP.Field.updateAndPushChanges Method

SP.Field.updateAndPushChanges Method

You could look at using the Microsoft Graph to make changes to the site column. The update operation for columnDefinition resource type appears to support propagation of changes.

Update columnDefinition

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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