Friday, September 30, 2016

how to get more than 100 items in a rest call in SP workflow

pathetically, sharepoint workflow bombed when i tried to get the __next parameter

with

System.ApplicationException: HTTP 500  {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore



so i changed the call to say gt ID - initially ID= 0 and when i looped through the first 100 i set the ID to the new id's - then I ran the call again - gt ID so it got the next group

Wednesday, September 28, 2016

Thursday, September 22, 2016

sharepoint and word

share point stores attributes of the document set in the actual word document so if you upload again unless the attributes are overwritten they will retain the old attributes

if your changes to the header on the first page dont apply to the other pages...


Thursday, September 15, 2016

SharePoint Designer

is evil. If you change a variable data type in the local var windows - it wont really change the used variable type.
You have to rewrite with a new name

simple jsom to get an item

Utils.getListItemByID = function (listName, itemID ){
var dfd =  $.Deferred();
context = SP.ClientContext.get_current();
web = context.get_web();
oList = web.get_lists().getByTitle(listName);

var currentItem = oList.getItemById(itemID);

context.load(currentItem);
context.executeQueryAsync(
function(){
dfd.resolve(currentItem);
},
function(sender,args){
dfd.reject(args.get_message());
}
);
return dfd.promise();
}


Utils.getListItemByID('blah', 36).then(function(item){ console.log(item.get_item('blahName')) },function(sender, args){ console.log(args.get_message())});