Quick tip: How to hide elements in SharePoint list command bar?
Krzysztof Borkowski
Azure AI Advisor @ Microsoft | Knowledge Sharing, User Interface Design
Before:
After:
??Notice: User will still be able to edit or delete items, it is just hiding those elements from the current view from the command bar of your list. To disable editing or deleting items please use row level security. For more info visit: Understanding permission levels in SharePoint - SharePoint in Microsoft 365 | Microsoft Docs
Select Format current view:
Choose Advance mode:
Copy and paste this JSON to the Format View of your current view to hide some elements.
{"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "new",
"hide": true
},
{
"key": "editInGridView",
"hide": true
},
{
"key": "integrate",
"hide": true
},
{
"key": "automate",
"hide": true
},
{
"key": "share",
"hide": true
},
{
"key": "delete",
"hide": true
},
{
"key": "edit",
"hide": true
}
]
}
}
M365 Adoption Lead | 2X Microsoft MVP |Copilot | SharePoint Online | Microsoft Teams |Microsoft 365| at CloudEdge
2 年Check out this video I recorded about the topic. https://youtu.be/Vawwaz2Mle8