Can I add an item in a predefined list via listview command set(Sharepoint Framework Extension)?
-
25-01-2021 - |
Question
Using SharePoint Framework extension, I have a list command set for a document library in SharePoint online.
On this button being clicked, I want to add an item in a predefined list in sharepoint online with server relative url of the selected document in the library.
So precisely, I am trying to add an item in the list using a list command set for which the page url is a library.
Can it be done? Can I actually add an item in list (one of JSOM operations?) via listview command set framework extension?
PS: I am new to Sharepoint so still trying to get familiar with its features and utilities.
La solution
Eventually I was able to do it by using PnPJS for Sharepoint online Javascript library.
Create a regular SPFx solution for list view command set. Add packages for sp-pnp-js.