Use command bar formatting and set the hide property for the Workflows command key in the list’s view JSON.
The command bar customization schema allows hiding any command by specifying its key and setting hide to true:
{
"commandBarProps": {
"commands": [
{
"key": "WorkflowsCommand",
"hide": true
}
]
}
}
Key points from the schema:
-
commands is an array of command objects.
- Each command object must have a
key that matches the command bar button.
-
hide is optional; default is false (visible). Setting it to true hides the command from both the command bar and the item context menu.
Once the correct key for the Workflows button is identified, deploy JSON similar to the above in the list view’s command bar formatting to prevent users (even with Contribute) from seeing or using that button.
References: