Wednesday, November 18, 2015
Tuesday, June 2, 2015
SharePoint 2013 - Create an App to get lists using CSOM
'use strict';
var context = SP.ClientContext.get_current();
var user = context.get_web().get_currentUser();
var web = context.get_web();
var list = web.get_lists();
(function () {
// This code runs when the DOM is ready and creates a context object which is
// needed to use the SharePoint object model
$(document).ready(function () {
getListCount();
});
// This function prepares, loads, and then executes a SharePoint query to get
// the current users information
function getListCount() {
context.load(web);
context.load(list);
context.executeQueryAsync(onGetListCountSuccess, onGetListCountFail);
}
// This function is executed if the above call is successful
// It replaces the contents of the 'message' element with the user name
function onGetListCountSuccess() {
var ernumerator = list.getEnumerator();
while(ernumerator.moveNext())
{
var listname = ernumerator.get_current();
alert(listname.get_title());
}
$('#message').text('Hello ' +list.get_count());
}
// This function is executed if the above call fails
function onGetListCountFail(sender, args) {
alert('Failed to get list count. Error:' + args.get_message());
}
})();
var context = SP.ClientContext.get_current();
var user = context.get_web().get_currentUser();
var web = context.get_web();
var list = web.get_lists();
(function () {
// This code runs when the DOM is ready and creates a context object which is
// needed to use the SharePoint object model
$(document).ready(function () {
getListCount();
});
// This function prepares, loads, and then executes a SharePoint query to get
// the current users information
function getListCount() {
context.load(web);
context.load(list);
context.executeQueryAsync(onGetListCountSuccess, onGetListCountFail);
}
// This function is executed if the above call is successful
// It replaces the contents of the 'message' element with the user name
function onGetListCountSuccess() {
var ernumerator = list.getEnumerator();
while(ernumerator.moveNext())
{
var listname = ernumerator.get_current();
alert(listname.get_title());
}
$('#message').text('Hello ' +list.get_count());
}
// This function is executed if the above call fails
function onGetListCountFail(sender, args) {
alert('Failed to get list count. Error:' + args.get_message());
}
})();
Sunday, April 5, 2015
Create your first app free in cloud Office 365 SharePoint 2013
Microsoft has provided an online free developer environment for creating Apps in SharePoint 2013.
In order to create an app below are the keys things we need to keep in mind
1) The site should be created using Developer site template.
2) When the developer site is created we would need to browse to SharePoint Store to add the NAPA tool as an app.
Start here.
https://msdn.microsoft.com/en-us/library/office/fp179924.aspx
In order to create an app below are the keys things we need to keep in mind
1) The site should be created using Developer site template.
2) When the developer site is created we would need to browse to SharePoint Store to add the NAPA tool as an app.
Start here.
https://msdn.microsoft.com/en-us/library/office/fp179924.aspx
Subscribe to:
Posts (Atom)