question

Mikello-6626 avatar image
0 Votes"
Mikello-6626 asked Mikello-6626 commented

Follow documents displayed using Highlighted content webpart

I have a business problem where site admins have setup Highlighted content webpart in various parts of the site to display documents based on a selected managed property (query rules in HCWebpart). So far so good. The reason for this is because doc libs have been setup with segregated permissions for a chunk of users who would be uploading/editing etc. but are looking to rollup docs from these libraries for another set of end users based on these highlighted content webparts for viewing purposes.

The issue is that site admins now want to provide a feature for these end users so they can "favorite" or "follow" a document from within these highlighted content webpart. I realize that this needs to be custom and I'm not a full developer. So far this is what I found: https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/react-command-follow-document
However this feature would only be available if each doc lib were exposed as a library webpart.

How can I modify the HCWebpart so that it exposes a similar functionality....or really any idea on how to tackle these two problems together? We still need the rollup of docs based on managed column + need to create a favorites feature

office-sharepoint-onlinesharepoint-devoffice-sharepoint-server-developmentoffice-sharepoint-server-customization
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Mikello-6626 ,
I am currently doing some research on this issue, will let you know as soon as possible

1 Vote 1 ·

1 Answer

RaytheonXie-MSFT avatar image
0 Votes"
RaytheonXie-MSFT answered Mikello-6626 commented

Hi @Mikello-6626 ,
Per my research, The github have updated the graph in the new version. The user need to have the read permission to the document at least. Here is the document about the graph.
https://docs.microsoft.com/en-us/graph/api/drive-list-following?view=graph-rest-1.0&tabs=http
You can use the 3.0 version of the follow document
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-follow-document


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RaytheonXie-MSFT Will this work from inside of a Highlighted Content Webpart?

0 Votes 0 ·

Hi @Mikello-6626 ,
Could you share more details about Highlighted Content Webpart?

0 Votes 0 ·

@RaytheonXie-MSFT I shared details in my question. It's a highlighted content webpart (HCWP) that aggregates documents from multiple libraries in the site. These doc libraries have managed metadata site columns for documents. We have multiple HCWP showing aggregated documents based on query.
Ex. A HCWP needs to show all documents in different libraries that have been assigned a metadata column value called Department = HR. For each of these documents shown in the HCWP, I was looking to have a feature within HCWP so that users can mark a favorites/star icon for favorite documents and then be able to access favorite documents from a generic place similar to the PnP webpart.

0 Votes 0 ·
Show more comments

Hi @Mikello-6626 ,
If you have any question about the issue, please feel free to reply.

0 Votes 0 ·