SharePoint / SharePoint/sp-dev-docs

Keys not working for specific JSON command bar customizations

Open
#10,323 4 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Jul 4, 2025.

area:list-formatting sharepoint-developer-support type:bug-confirmed type:bug-suspected
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Developer environment

None

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details

Microsoft Edge

Describe the bug / error

I have tested all keys at https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/view-commandbar-formatting including the changes detailed in the recent updates section.

The following keys relate to both Lists and Document libraries and do not function in either of them:

automateCreateRule
automateManageRules

powerAppsCreateApp
powerAppsSeeAllApps
powerAppsCustomizeForms

powerBIVisualizeList

The following keys relate to Document libraries and do not function:

newWordDocument
newExcelWorkbook
newPowerPointPresentation
newOneNoteNotebook
newFormsForExcel
newVisioDrawing
newLink
editNewMenu

uploadFile

openInOfficeOnline
openInOfficeClient
openInImmersiveReader

The following key relates only to Lists and does not function:

powerAppsCreateApp

All others keys function as expected.

By way of brief summary the keys for the lowest level menu items in the hierarchy do not function. There are exceptions to:

  1. newFolder and addTemplate function under newComposite function but all its sibling keys do not.
  2. stasherCommand.myFiles, stasherCommand.otherLocation, complianceDetails and PublishCommand keys function.

The key I am most keen to get fixed is newLink.

Thanks in advance :)

Steps to reproduce

1.I have tested on multiple lists and document libraries across multiple SharePoint sites and browsers.
2. I have used one key at a time and have verfified all other keys work.
3. I have used two keys at a time and have verfified one works and the keys above do not.
4.This is very straighforward to replicate,

Expected behavior

That the keys above could be used to hide specific items. An example is below:

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{ "key": "newFolder", "hide": true },
{ "key": "newWordDocument", "hide": true },
{ "key": "newExcelWorkbook", "hide": true },
{ "key": "addTemplate", "hide": true }
]
}
}

newFolder and addTemplate function correctly. newWordDocument and newExcelWorkbook do not function correctly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.