Tag Info

Hot answers tagged

4

You could perform this via CSOM/REST API. Use SP.Web.getFileByServerRelativeUrl Method to request File object and specify SP.File.listItemAllFields property to load list item field values for the list item corresponding to the file: var ctx = SP.ClientContext.get_current(); var file = ctx.get_web().getFileByServerRelativeUrl(url); //get file ...


4

CAMLViewFields: '<ViewFields>'+ '<FieldRef Name="NamePage" />'+ '<FieldRef Name="Date" />'+ '<FieldRef Name="Title" />'+ '<ViewFields>' should be CAMLViewFields: '<ViewFields>'+ '<FieldRef Name="NamePage" />'+ '<FieldRef ...


3

The trick is to set the CAMLQueryOptions so that you get all the items regardless of what folder they are in. It's sort of like the "folderless" option in a view's settings. CAMLQueryOptions: "<QueryOptions><ViewAttributes Scope='RecursiveAll' /></QueryOptions>"; The GetListItems documentation on MSDN is a little light on these options. ...


3

It basically depends on your personal experience with the different technologies, there are many opinions out there with lots of pros and cons that may or may not be relevant to you. I personally very much dislike pure javascript CSOM because of all the context loading and SPServices was a good abstraction for that, but eversince I've used REST in SP2013 I ...


2

Pros A wide range of SharePoint functionality is exposed with the SOAP Web Services, much of which is not available in CSOM Allows anonymous access (assuming it is enabled for the underlying objects) Works cross-site and cross-domain, assuming that the authentication model you are using allows it Simpler syntax than the CSOM. Simply pass the required ...


2

I think you'd need to do it in 2 calls. First, you'd have to query your list with a GetListItems call with CAML query like: <ViewFields> <FieldRef Name='ID' /> </ViewFields> <Where> <Eq> <FieldRef Name='LinkFilename' /> <Value Type='Computed'>file.txt</Value> ...


2

The SharePoint services, the problem with answering this question lies in the word 'the'. SharePoint is a big application or rather a mix of several applications. Thus it supplies both Web/WCF Services like the ones that the Client object Model uses it supplies REST services which is also web based. But it also has several windows based services like the ...


1

SharePoint 2010 Web Services uses Simple Object Access Protocol (SOAP) over HTTP and acts as a communications interface between client programs and SharePoint. SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use.


1

You can get the list url from the get_defaultViewUrl method... when you load the lists you need to use the include statement to retrieve the defaultViewUrl property (it isn't included with the list results by default). Change your context.load line to: context.load(lists, 'Include(Title,DefaultViewUrl)'); Then inside of your iterator loop you can use ...


1

Regarding grouping in SharePoint REST, according to Use OData query operations in SharePoint REST requests, Grouping is not supported. One of the solution, is to apply grouping for the JSON results returned from REST endpoint. Example Suppose the following function for getting list items via SharePoint REST API: function getListItems(url, listname, ...



Only top voted, non community-wiki answers of a minimum length are eligible