Add a button to document library in Sharepoint online

%3CLINGO-SUB%20id%3D%22lingo-sub-2468505%22%20slang%3D%22en-US%22%3EAdd%20a%20button%20to%20document%20library%20in%20Sharepoint%20online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2468505%22%20slang%3D%22en-US%22%3E%3CP%3EAdd%20a%20button%20to%20document%20library%20in%20Sharepoint%20online%20and%20able%20to%20do%20my%20custom%20operations.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2468717%22%20slang%3D%22en-US%22%3ERe%3A%20Add%20a%20button%20to%20document%20library%20in%20Sharepoint%20online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2468717%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1073769%22%20target%3D%22_blank%22%3E%40vaibhav_vashist%3C%2FA%3E%26nbsp%3BIf%20you%20are%20using%20SharePoint%20online%2C%20you%20can%20achieve%20this%20using%20%3CSTRONG%3ESPFx%20ListView%20Command%20Set%20extension%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20more%20information%20on%20how%20to%20develop%20it%2C%20check%20this%20documentation%3A%26nbsp%3B%3CA%20title%3D%22Build%20your%20first%20ListView%20Command%20Set%20extension%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fspfx%2Fextensions%2Fget-started%2Fbuilding-simple-cmdset-with-dialog-api%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBuild%20your%20first%20ListView%20Command%20Set%20extension%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CHR%20%2F%3E%3CP%3EPlease%20click%26nbsp%3B%3CSTRONG%3EMark%20as%20Best%20Response%3C%2FSTRONG%3E%26nbsp%3B%26amp%3B%20%3CSTRONG%3ELike%3C%2FSTRONG%3E%20if%20my%20post%20helped%20you%20to%20solve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%20%3CSTRONG%3ELike%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2468729%22%20slang%3D%22en-US%22%3ERe%3A%20Add%20a%20button%20to%20document%20library%20in%20Sharepoint%20online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2468729%22%20slang%3D%22en-US%22%3EPlease%20check%20this%20and%20let%20me%20know%20if%20your%20issue%20is%20solve%20or%20not.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fsharepoint%2Fcreate-a-button-in-sharepoint-online%2Fm-p%2F292256%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fsharepoint%2Fcreate-a-button-in-sharepoint-online%2Fm-p%2F292256%3C%2FA%3E%3C%2FLINGO-BODY%3E
New Contributor

Add a button to document library in Sharepoint online and able to do my custom operations.

6 Replies

@vaibhav_vashist If you are using SharePoint online, you can achieve this using SPFx ListView Command Set extension.

 

For more information on how to develop it, check this documentation: Build your first ListView Command Set extension 


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.

@vaibhav_vashist What kind of operations you want to perform?

 

You can also Create a button to launch a Power Automate flow within document library using JSON formatting. Check below documentation for this:

Create a button to launch a Flow 


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.

I want to build CRUD operations on it.

@vaibhav_vashist 

My suggestion will be to develop a SPFx ListView Command Set extension as you will have greater flexibility & more options to perform CRUD operations on documents.

 

You can also use SP PnP JS in SPFx extensions which will help you to perform the CRUD operations more easily. You can find few SPFx extension samples to get started with in below GitHub repository:

SharePoint FrameWork extension samples 


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.

My suggestion is that create PowerApps forms its easy and low code solution for you