Posts

Showing posts from February, 2017

Read Document Library Items

 $().SPServices({     operation: "GetListItems",     async: false,     listName: "DOCUMENT LIBRARY",     CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='EncodedAbsUrl'/></ViewFields>",     completefunc: function (xData, Status) {       $(xData.responseXML).SPFilterNode("z:row").each(function() {         var doc = "<li><a href="+$(this).attr("ows_EncodedAbsUrl")+">" + $(this).attr("ows_Title") + "</a></li>";         $("#divTag").append(doc);       });     }   });

Retrieve SharePoint List Item Attachments using SPServices

$().SPServices({         operation: "GetAttachmentCollection",         async: false,         listName: "LIST NAME",         ID: ItemID,         completefunc: function(xData, Status) {             var attachments = [];               $(xData.responseXML).find("Attachment").each(function() {                var url = $(this).text();                attachments.push(url);             });                     }    });