pnp / List-Formatting

List Formatting Samples for use in SharePoint and Microsoft Lists
https://pnp.github.io/List-Formatting/
MIT License
1.7k stars 822 forks source link

Added "share-to-teams" sample #699

Closed 365knoten closed 10 months ago

365knoten commented 10 months ago
Q A
Bug fix? no
New sample? yes
Related issues? no

What's in this Pull Request?

This sample formats a column as an icon in a document library. If a user clicks that icon the "Share to Microsoft Teams" dialog opens. Now the user can create a new message in Teams with the current file as a link.

tecchan1107 commented 10 months ago

I didn't know about this deep link!! Thanks for sharing and for the great sample🤩✨

When merging, I made a fix that uses @currentWeb and the substring operator to eliminate the need to rewrite the tenant names in the code. Please check the following link! https://github.com/pnp/List-Formatting/tree/master/column-samples/generic-share-to-teams

Once again, thank you for the excellent sample!!

365knoten commented 10 months ago

Oh, of course "@currentWeb". I knew there was somthing like this I could have used.

Thank you :)