Forum Discussion
Bron_Brookes
Jul 11, 2024Copper Contributor
Unable to change Folder Content Type to Document Set or Vise Versa
Hoping I can get some assistance. Issue: I have a SharePoint library that uses document sets. This library is sync'd to a few staff members local computers so they can manage files. Staff have been ...
- Jul 11, 2024The feature to change the content type of a folder to a document set directly from the SharePoint library's information pane used to be available, but it seems to have been altered or removed in recent updates. As of now, the ability to change the content type in this manner is not available, and using the REST API is the workaround.
Here are a few steps to manage this situation and alternatives:
Using REST API
REST API Method: You can use SharePoint REST API to change the content type of a folder to a document set. Here's a basic outline of how you might do this:
Use GetFolderByServerRelativeUrl to get the folder.
Update the folder's content type using the Update method
POST /_api/web/GetFolderByServerRelativeUrl('/sites/yoursite/Shared Documents/yourfolder')/ListItemAllFields
{
"__metadata": { "type": "SP.Data.YourLibraryNameItem" },
"ContentTypeId": "0x0120D520A8D97A4A8D9A43C6DAEC0AFC54" // Example Document Set content type ID
}
Alternative Methods
Library Settings and Policies:
Check if there are any site collection features or library settings that might be affecting content type management. Ensure that content type management is enabled for the library.
Go to the library settings, and under “Advanced settings”, ensure that “Allow management of content types” is set to “Yes”.
Power Automate (Flow):
Create a Power Automate flow that triggers when a new folder is created and then changes the content type to a document set. This approach can automate the process and remove manual intervention.
Example steps:
Trigger: When a new item is created in the library.
Action: Update item properties, including changing the content type.
Jul 11, 2024
The feature to change the content type of a folder to a document set directly from the SharePoint library's information pane used to be available, but it seems to have been altered or removed in recent updates. As of now, the ability to change the content type in this manner is not available, and using the REST API is the workaround.
Here are a few steps to manage this situation and alternatives:
Using REST API
REST API Method: You can use SharePoint REST API to change the content type of a folder to a document set. Here's a basic outline of how you might do this:
Use GetFolderByServerRelativeUrl to get the folder.
Update the folder's content type using the Update method
POST /_api/web/GetFolderByServerRelativeUrl('/sites/yoursite/Shared Documents/yourfolder')/ListItemAllFields
{
"__metadata": { "type": "SP.Data.YourLibraryNameItem" },
"ContentTypeId": "0x0120D520A8D97A4A8D9A43C6DAEC0AFC54" // Example Document Set content type ID
}
Alternative Methods
Library Settings and Policies:
Check if there are any site collection features or library settings that might be affecting content type management. Ensure that content type management is enabled for the library.
Go to the library settings, and under “Advanced settings”, ensure that “Allow management of content types” is set to “Yes”.
Power Automate (Flow):
Create a Power Automate flow that triggers when a new folder is created and then changes the content type to a document set. This approach can automate the process and remove manual intervention.
Example steps:
Trigger: When a new item is created in the library.
Action: Update item properties, including changing the content type.
Here are a few steps to manage this situation and alternatives:
Using REST API
REST API Method: You can use SharePoint REST API to change the content type of a folder to a document set. Here's a basic outline of how you might do this:
Use GetFolderByServerRelativeUrl to get the folder.
Update the folder's content type using the Update method
POST /_api/web/GetFolderByServerRelativeUrl('/sites/yoursite/Shared Documents/yourfolder')/ListItemAllFields
{
"__metadata": { "type": "SP.Data.YourLibraryNameItem" },
"ContentTypeId": "0x0120D520A8D97A4A8D9A43C6DAEC0AFC54" // Example Document Set content type ID
}
Alternative Methods
Library Settings and Policies:
Check if there are any site collection features or library settings that might be affecting content type management. Ensure that content type management is enabled for the library.
Go to the library settings, and under “Advanced settings”, ensure that “Allow management of content types” is set to “Yes”.
Power Automate (Flow):
Create a Power Automate flow that triggers when a new folder is created and then changes the content type to a document set. This approach can automate the process and remove manual intervention.
Example steps:
Trigger: When a new item is created in the library.
Action: Update item properties, including changing the content type.
- sumithassaneshanJul 11, 2024Copper Contributor.