How do you disable attachments in a list with items over 5000 items?

Iron Contributor

I have a list and it has over 5000 items, and when I go to the list settings, I go to turn attachments OFF (disable) I click OK and I get the error:

The attempted operation is prohibited because it exceeds the list view threshold.

 

Is there no way to turn attachments off?  There are no attachments, the user just wants to have the item hidden in the newform.aspx

3 Replies
I've had odd issues with list views in the past, not sure this will work for this but worth a shot.
Only thing I can think of is try changing the default view on the list, and add a filter so it return 0 or a low amount of items and save it. Then go back and try to set the setting. I doubt it will work cause it should never hit the list view but worth a shot, I couldn't apply anything to my list the other day and had to modify the list view to get it to take.

You could always do a customize powerapp form for the list, and easily remove the attachment field there. It's a simple process if you never did customize form inside the list you just hit the button, go to the form, click fields, and take out attachments then save / publish and your done.
Unfortunately that didn't work. Thank you for the suggestion. I went and created a view and set the filter to only show 10 items and stopped at that and then set it to be the default in a modern list in SharePoint Online. Still got that error.

I tried to "reproduce" the same behavior by creating a large list (5100 items) through script, in both modern and classic team site. But even there, I was able to disable attachments afterwards.

Did you try to handle the settings through PowerShell / CSOM?

A (maybe huge?) solution could be to create a second list using the "from an existing list" option, move items from the first list to the second using PowerShell / CSOM / Power Automate to be under 5000 items, disable list attachments and move back items.