mercredi 18 mars 2015

Is it possible to simply enable incoming email and set the email address using SharePoint 2013 JavaScript Object Model (JSOM)?



I know this can be done with C#, but I am restricted to a client (JSOM) only environment. I already looked at all the properties and functions of the SP.list (oList in the code below) object using the Chrome, and see no functions related to email.



createTestList: function () {
var clientContext = new SP.ClientContext(currentPage);
var oWebsite = clientContext.get_web();

var listCreationInfo = new SP.ListCreationInformation();
listCreationInfo.set_title('Test List');
listCreationInfo.set_templateType(SP.ListTemplateType.documentLibrary);

var oList = oWebsite.get_lists().add(listCreationInfo);
oList.set_description('Just a test list');

//TODO: Determine whether we can set email alias <--------------

oList.update();

clientContext.load(oList);
clientContext.executeQueryAsync(
function () {
console.log('Successfully created list.');
console.log(oList);
},
function (sender, args) {
console.log('Error creating list ' + args.get_message());
}
);
}
});







0 commentaires:

Enregistrer un commentaire