Forum Discussion
customRowAction on Document Sets
- Oct 07, 2022
automan25 You can open the document set properties on button click using editProps action.
For example:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "button", "txtContent": "View Properties", "customRowAction": { "action": "editProps" } }Output:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
automan25 Unfortunately, there is no action available in JSON formatting to open it in view mode.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- AshishBaranwalNov 21, 2023Copper ContributorBit surprising , what would happen if the user doens't have edit rights on the document set. They will be forced to use the OOTB way.
- ganeshsanapNov 21, 2023MVP
You can try using defaultClick action in customRowAction property. Example:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "button", "txtContent": "View Properties", "customRowAction": { "action": "defaultClick" } }defaultClick: buttons with this action will do the same thing as clicking the list item in an uncustomized view. Above is an example of a button that, when clicked, simulates a click on the item, which results in opening the list item. Adding this example button to a document library simulates a click on the file or folder, which results in the file or folder being opened.
Please consider giving a Like if my post helped you in any way.