0.0.1 • Published 9 years ago

sp-folder-creation-information v0.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

sp-folder-creation-information

Create a new SharePoint folder creation information.

Installation

npm install sp-folder-creation-information --save

Usage

var folderCreationInformation = require('sp-folder-creation-information');

var clientContext = SP.ClientContext.get_current();
var web = clientContext.get_web();
var list = web.get_lists().getByTitle('list title');

var listItemCreationInformation = folderCreationInformation('folder name'); // Or folderCreationInformation('folder name', 'parent folder url')
var listItem = list.addItem(listItemCreationInformation);
listItem.update();

clientContext.load(listItem);
clientContext.executeQueryAsync(function () {
    // Do something
}, function (sender, args) {
    // Error
});

License

MIT.