I use this code to get the date of the last edit of a certain list. Now I want to loop through the listitems and identify the item that was changed last, so i.e. that has the same date as the lastItemModifiedDate()
How you I do this?
Anyone?
ExecuteOrDelayUntilScriptLoaded(Initializeall, 'sp.js');
function Initializeall()
{
var ctx = SP.ClientContext.get_current();
var web = ctx.get_web();
var lists = web.get_lists();
var list = lists.getByTitle("Sample");
ctx.load(list, "LastItemModifiedDate");
ctx.executeQueryAsync(
function() {
var lastmodified = list.get_lastItemModifiedDate();
alert(lastmodified);
},
function() {}
);
}
</script>