You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/en/SharePointOnline/hidebuttons.md
+97-9Lines changed: 97 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,14 @@ date: '2024-11-09'
10
10
---
11
11
12
12
13
-
This article will give you a few json formatting examples on how to hide buttons in the command bar of a SharePoint list view, such as "add new item", or "automate".
13
+
This article will give you a few JSON formatting examples on how to hide buttons in the command bar of a SharePoint list view, such as "add new item", or "automate".
14
14
15
15
16
16
# TL;DR;
17
17
18
-
You can hide one or more buttons in the command bar of your SharePoint list by using the following json. Pick only the keys you want to hide!
19
-
18
+
You can hide one or more buttons in the command bar of your SharePoint list by using the following JSON. Pick only the keys you want to hide!
@@ -94,27 +94,115 @@ You can hide one or more buttons in the command bar of your SharePoint list by u
94
94
}
95
95
}
96
96
97
+
```
97
98
98
99
99
100
# Intro
100
101
101
102
The command bar in SharePoint Online list view has several buttons:
102
103
104
+
* Add new item
105
+
* Edit in grid view
106
+
* Undo
107
+
* Share
108
+
* Export
109
+
* Forms
110
+
* Automate
111
+
* Integrate
112
+
* Alert me
113
+
* Manage my alerts
103
114
104
115
105
-
And some extra ones that appear when you select an item:
106
-
116
+
And some extra buttons that appear in the command bar when you select an item:
107
117
118
+
* Edit
119
+
* Share
120
+
* Copy link
121
+
* Comment
122
+
* Delete
123
+
* Version history
108
124
109
125
110
-
IMG
126
+
<imgsrc="/articles/images/hidebuttons7.png" >
111
127
112
-
A list of command bar buttons with the corresponding key:
128
+
<imgsrc="/articles/images/hidebuttons.png" >
113
129
114
130
115
131
# Hide a button in the command bar
116
-
If you want to hide e.g. "add new item" button in the command bar of your SharePoint Online list, navigate to
117
132
133
+
If you want to hide e.g. "add new item" button in the command bar of your SharePoint Online list, navigate to the view name on the right (e.g. "All Items"), and click "Format current view"
134
+
135
+
<imgsrc="/articles/images/hidebuttons3.png" >
136
+
137
+
At the bottom there is an Advanced Mode button. You may need to scroll. Click on the Advanced Mode:
138
+
139
+
<imgsrc="/articles/images/hidebuttons2.png" >
140
+
141
+
and enter the JSON code with your selected keys.
142
+
143
+
<imgsrc="/articles/images/hidebuttons4.png" >
144
+
145
+
146
+
147
+
Mind you, the buttons are only hidden. The functionalities still exist. Hiding the keys from the SharePoint list does not affect users' permissions. If they find a creative way (e.g. via Graph API) to add a new item, or create a flow starting from Power Platform entry point - they can still do it.
148
+
149
+
### A list of command bar buttons with the corresponding key
150
+
151
+
The keys have very intuitive names. Most of them are called exactly by their display name (the name you see in the user interface). There are only a few exceptions. Here you can find the list of command bar buttons with the corresponding key:
152
+
153
+
| Name | Key |
154
+
| -------- | ------- |
155
+
| Add new item | new |
156
+
| Edit in grid view | editInGridView |
157
+
| Undo | undo |
158
+
| Share | share |
159
+
| Export | export |
160
+
| Forms | manageForms |
161
+
| Automate| automate |
162
+
| Alert me | alertMe |
163
+
| Manage my alerts | manageAlert |
164
+
| Edit | edit |
165
+
| Copy link | copyLink |
166
+
| Comment | comment |
167
+
| Delete | delete |
168
+
| Version history | versionHistory |
169
+
170
+
# Examples
171
+
172
+
### Example 1
173
+
174
+
Hide the alerts functionality - "Alert me" and "Manage my alerts":
0 commit comments