Tag Info

New answers tagged

0

Since ID is a longint, you can't. So, you need to put it to a string field. You can't use calculated values, so a SP workflow could do the trick.


1

Even though Web class does not expose Groups property like SPWeb class does, you could still retrieve a collection that contains all the groups for the website. How to retrieve groups for a web Use RoleAssignmentCollection.Groups property to get the groups that directly belong to the access control list (ACL). for this securable object. CSOM using (var ...


0

As Tommy pointed out and according to 3.1.4.3 Document: Inserting new documents to a document library involve sending a POST request containing the contents of the document to the EntitySet representing the document library. The protocol client MUST include the SLUG header (as specified in RFC5023 section 9.7) whose value is the name of the file ...


1

I use to call REST like this in my current project: var formDigest = $('#__REQUESTDIGEST').val(); $.ajax({ type: "POST", url: "your URL here", headers: { "X-RequestDigest": formDigest }, contentType: 'application/json; charset=utf-8', data: JSON.stringify({ "ParamName": "Param Value" }), datatype: 'json', }) .done(function (data) { ...


0

Just found a way around! Using SPservices: function NuevaIncidencia(){ $('#Aceptar').attr("disabled", "disabled"); var values = [['Title', $('#titulo').val()], ['Descripci_x00f3_n', $('#descripcion').val()], ['Tipo_x0020_Incidencia', $('#tipo').val()], ['Prioridad', $('#prioridad').val()], ['Estado', 'Abierta']]; ...


0

& symbol could not be used in $filter query option expression. Replace & with and operator, for example: $filter=(StartDate ge datetime'2014-01-01T00:00:00Z') and (Odata__EndDate le datetime'2013-12-31T00:00:00Z') References Working with folders and files with REST


0

Take this answer with a grain of salt but it seems that you cannot do this with REST. However, I have found an answer from JSOM if that might help. This answer was taken from this link. Here is the full code that gets and sets (optional) approval status (Possible values for this.oListItem.get_item('_ModerationStatus'): 0 - "Approved", 1 - "Denied", 2- ...


1

The data are under: data.d.result Try this: var newRows = ""; $(data.d.results).each(function (index) { newRows += "<tr><td>" + data.d.results[index].FirstName + "</td><td>" + data.d.results[index].FullName + "</td></tr>"; });


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 ...


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, ...


0

Try switching to using single quotes on the attributes Source: Here var CamlQuery = "<Query><GroupBy Collapse='TRUE'><FieldRef Name='nameA' /></GroupBy></Query>"; var CamlViewFields="<ViewFields><FieldRef Name='nameA' /></ViewFields>";


1

Ok after a little messing I managed to get this to work. Despite having a publishing site I still had to set up my site and also the active directory connection and synchronisation service. With those items in place the Internal Server error 500 vanished and the data was displayed. Thanks to everyone for their help in getting to the bottom of this, a ...


0

You can access the host web to check in the file using REST with the cross domain javascript library as mentioned in this article link. You need to execute the query on the RequestExecutor.


-1

Solution found here, paslatek's comment: http://techmikael.blogspot.de/2013/07/how-to-copy-files-between-sites-using.html?showComment=1407787676122 The problem is that the Microsoft SP.RequestExecutor.js is doing this conversion: if (requestInfo.binaryStringResponseBody) { responseInfo.body = ...


1

How about a simple query: /_api/web/lists/getbytitle('<list title>')/items(<item id>) which will return all the field values for a list item with some limitation for User/Lookup fields: only lookup id values will be retrieved. In order to request all the field values including User/Lookup field values, you could specify * to select all ...


0

Try using the below URL : _spPageContextInfo.webServerRelativeUrl+ "/_api/SP.UserProfiles.PeopleManager/GetMyProperties If you still do not get the code working try accessing the URL in the browser http://yoursite.yourdomain.com/_api/SP.UserProfiles.PeopleManager/GetMyProperties and see if the results are returned. If you get a feed reading ...


0

I have resolved the issue. When you try to create/update list item just check the fields details of the list using the REST API. for an example I have created a List named TestList. Following is the field details: Title: Text TestCL1: Text TextCL2: Text TestCL3: People and Group Now to check the field details you just add some dummy element in the List ...


2

It depends whether User/Lookup field value is multiple or not, the following formats are used when specifying field value via SharePoint REST: Single User/Lookup value format: FieldName: LookupIdVal Mutiple User/Lookup value format: FieldName: {"results": [LookupIdVal1,LookupIdVal2] } How to set multiple lookup/user field value via SharePoint REST API ...


1

Try using 1 for true, 0 for false. I was able to replicate your problem in SPO, but using 1/0 worked fine: /_api/web/lists/getbytitle('BtProjects')/items?$filter=Active eq 1


0

I thought I had already tried Active ne false but I guess I had not. That seems to work. It looks like the eq filter is broken for booleans, though.


0

I found the best way of accomplishing this was to create a workflow and use the workflow initiation form to capture all the necessary meta data, and then create the document via the workflow itself, inserting the corresponding fields from the initiation form into the document columns.



Top 50 recent answers are included