Apr 22 2021 01:22 AM - edited Apr 22 2021 01:38 AM
Hello everybody,
I hope you can help me out with my question. I was searching a whole day and I couldnt find a solution.
I am working with SharePoint Online and my goal is to make the "Properties" button for a file inside a document library more accessable. Cause the button is really hidden in subsubmenues.
I would like to create my own (SPFX based) ecb menu item. which I already did, but now I would like to open the properties of the selected Item and I have no idea how.
When I look up the event receivers of that button I only see jibberish.
Does anybody know how to call the "ShowPropertiesAction" inside a document library?
I am very happy for any answers
With regards,
Kevin
Apr 23 2021 04:32 AM
Solution@powerCorner You can achieve similar functionality using JSON formatting with less efforts. Follow below steps:
1. Create a new single line of text column in document library
2. Format the newly created column using below JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Open properties",
"customRowAction": {
"action": "editProps"
}
}
3. Hide this column from library forms (make it Hidden from advanced content type management settings).
Output:
On click of this button, file properties pane will be open at the right side. Optionally, you can apply styling to the button as per your requirements. for that check official documentation of JSON formatting.
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.
Apr 25 2021 01:30 AM
Apr 23 2021 04:32 AM
Solution@powerCorner You can achieve similar functionality using JSON formatting with less efforts. Follow below steps:
1. Create a new single line of text column in document library
2. Format the newly created column using below JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Open properties",
"customRowAction": {
"action": "editProps"
}
}
3. Hide this column from library forms (make it Hidden from advanced content type management settings).
Output:
On click of this button, file properties pane will be open at the right side. Optionally, you can apply styling to the button as per your requirements. for that check official documentation of JSON formatting.
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.