4,039 reputation
2923
bio website
location Norway
age 27
visits member for 4 years, 7 months
seen 5 hours ago

Nov
17
comment Scheduled task sharepoint 2013
How about app-only permission and TokenHelper? Ref blogs.msdn.com/b/kaevans/archive/2014/03/02/…
Nov
17
comment Continous loop to check if a list item has changed, javascript
Same as you are already using, yes
Nov
17
comment Continous loop to check if a list item has changed, javascript
Try calling oListItem.update();, and executeQueryAsync after that
Nov
17
comment Continous loop to check if a list item has changed, javascript
@matt updated answer
Nov
17
comment Dynamically get default display form url in sharepoint 2013 by REST or JSOM
Try data.value. It could alter if you use SPO, on premise or through an app. What you can do is to call console.log(data) and you will see the object structure in say Chrome dev tools. Another option is to view it in Dev tools network tab. Yet another is to set break point and inspect data variable.
Nov
17
comment help in adding a http link in script editor - cant get it to work
What are the forward slashes for? Wouldn't that just make the attribute values into regular expressions?
Nov
16
comment SharePoint 2013 REST how to add pagination?
Have you checked your console? Could it be a problem with copy/paste programming? Anyway, here is some code you can add directly into script editor Web Part, just to get you going: gist.github.com/eirikb/9961411d6e879b943eb2
Nov
14
comment 400 Bad Request while trying to add a user to a group using ShP 2013 REST api
Yeah ok now I see what you mean. JSON itself will of course use backslash to escape (ref JSON.stringify('\\')). But still, the link you provide is about URLs and URIs and not post body, and not even JSON, which is why I was confused :)
Nov
14
comment 400 Bad Request while trying to add a user to a group using ShP 2013 REST api
I just have to ask; how is restricted characters for WCF related to post body in REST? You don't need to escape them in the post body. Maybe if you use them as keys in a JSON object, but I don't even know how to test that (and that is not what OP has anyway)
Nov
14
comment 400 Bad Request while trying to add a user to a group using ShP 2013 REST api
@robert-lindgren did you just accidentally solve the question when cleaning/editing it (adding tow backslashes)? :D
Nov
14
comment 400 Bad Request while trying to add a user to a group using ShP 2013 REST api
Have you looked at the respone message content? I think it might be helpful for you. If you are uncertain where to find it consider using Fiddler, Wireshark or similar.
Nov
14
comment How to get deferred object for sharepoint rest queries
Sounds like you want to use $.ajax({async:false}) and drop promises. While that is possible, IMHO it's a bad idea. Returning a promise is a good thing, even if it adds some lines to the library usage. E.g., what would you do if you wanted to bundle several requests and wait for all of them to finish? With a promise that is superdupereasy
Nov
14
comment How to get deferred object for sharepoint rest queries
The object you get back is the promise, not the data. It's not synchronous, so you would do something like RESTQueries.readItemsFromList().then(function(data) { console.log(data); });
Nov
13
comment SharePoint 2013 REST how to add pagination?
@MehdiJalal the explanation above should be a sufficient starting point IMHO, after all you might want to implement this in smart-table, ng-grid, ngtable or the other pals and so the code would be quite different. However I will oblige and spoon-feed you as soon as I get home from work in some hours
Nov
13
comment SharePoint 2013 REST how to add pagination?
I don't think $skip works @pholpar, my example above does, it's how I do it on SharePoint online at least (just look at _next when you query /Items).
Nov
6
comment Automatic Bootstrap Tabs in SharePoint
If you can stick with one version of jQuery that is the best. I'll just copy/move my top comment to question in order to snag a point.
Nov
6
comment Automatic Bootstrap Tabs in SharePoint
There are several ways, you might be able to use jQuery.noConflict. When it comes to SharePoint I usually just use requirejs (or browserify), although that might be a bit much
Nov
6
comment Automatic Bootstrap Tabs in SharePoint
That means jQuery.fn.tab is undefined, which means the jQuery version you are working on does not have Bootstrap tabs appended to it. This could be the result of many things, such as not including the bootstrap script, or order of scripts, or having several versions of jQuery on the same page
Nov
5
comment URL field in sharepoint : Points to Control Template when http removed
The most simple straight forward answer would be to just do something like this with UriBuilder. But I suspect you have thought about this since you ask?
Nov
5
comment Transfer times for REST API queries vary a lot
I just have to ask; why would REST need more round trips than JSOM? In the example query by OP there is one single query for items, and this can be made smaller by using $select. If additional data is needed $expand will give much the same stuff as JSOM without additional request. I would say it is the contrary, the JSON response from REST can be smaller than the bloated one from JSOM