SharePoint 2010 ECMAscript – Copy\Move files to another document library
In this post we see a detail example of creating a Ribbon button which when clicked will copy the selected documents from a document library to a pre-defined library (destination library) using ECMAScript.
The steps that user will follow to Copy the the files -
1. Select documents in document library.
2. Click on Copy Documents button in “Manage group” of ribbon.
3. User will be notified via notification that the selected files has been moved.
4. Now, we will add the code for creating a custom button (under Documents tab in the Manage group) which will get displayed in your document library. Also in the “commandAction” you will see the ECMAScript needed for copying the selected documents to the destination library. In this example destination library is hardcoded but you can always create a custom modal dialog for asking user about the destination library.
See the complete code and notifications in Part 2 >>