4,136 reputation
2923
bio website
location Norway
age 28
visits member for 4 years, 9 months
seen 30 mins ago

2d
comment Deploying an HTML App to Multiple Sites
Did you see this? Also you can't use SharePoint-hosted because it is an iframe? - if so, why?
Jan
29
comment Seconds since item created with REST. Perhaps use server current time (clock)
I kind of feel I'm trading one hack for another, would be nice to have a proper timestamp somwhere in _api. Oh well, I guess this is the best answer I will get, and the correct one at that. Thanks :)
Jan
29
comment Seconds since item created with REST. Perhaps use server current time (clock)
Not a bad idea at all. Compared to my current hack I guess here you get the date from IIS, while I get it from SharePoint, but that would be the same, and here you have GMT while I get UTC, but that is also basically the same right?
Jan
29
comment Access denied while calling external URL ajax call
Understanding how the JSONP hack actually works would give you a good idea. This answer on SO should give a good explanation. If it is your server then do consider my two other suggestions as well (CORS and web proxy).
Jan
29
comment Access denied while calling external URL ajax call
Note that the server must implement support for JSONP, it is not automatically given that the server in your example supports this.
Jan
29
comment Access denied while calling external URL ajax call
Isn't this normal Same-origin policy? Unless that site has CORS enabled. There are ways to solve this, such as CORS, JSONP or app proxy.
Jan
26
comment SP 2013 - Updating a multi-value lookup field via the REST API
+1. Just a note, in my case the type property in __metadata had to be correct. You get the type either __metadata.type from an item or from ListItemEntityTypeFullName on the list.
Jan
20
comment SharePoint 2013 Provider Hosted App is not working after Published to IIS throwing object reference error in Getting clientcontext
Wild but highly probable guess: When you deployed the ClientId (in Web.config of your app) changed, you either have to make a new one (hazzle) or find the old one.
Jan
19
comment Writing sharepoint CSOM applications best practices
With your browsers dev tools you have a wide specter of debugging options (such as break points) available in point 1, 2, 3 and 4.
Jan
13
comment ListItemCollectionPosition returning null
Have you tried currentQuery.ViewAttributes = "Scope=\"RecursiveAll\""?;
Jan
6
comment sharepoint 2010 javascript get items from a document library
Just a small note, I think the clue here is Scope="RecursiveAll" attribute on the View tag, I guess the actual items are subelements of the files or something, hence the need of recursive
Jan
6
comment Get web part Id with javascript client OM
@dotsa I might be wrong, but isn't your question the same as the first comment by dino? If so look at my answer in the second comment.
Nov
25
comment Uploading files >40MB using SP.requestexecutor to sharepoint online hangs the browser
Since you have provider-hosted app, can't you just do this with C# and CSOM? Also, since you have 365 have you looked at StartUpload?
Nov
25
comment Provider Hosted application often stops debugging
Just to be sure: You have set Ping Enabled to False in IIS for the respective application pool(s)?
Nov
25
comment REST API filter by month
Are you asking how to filter items by a given month, or how to get items and display only month?
Nov
24
comment Get last created item from SharePoint List using REST
Ok @NadeemYousuf. I just did a test on SharePoint Online and there ID worked, while Id did not. Could be difference between 2010 and 2013? Beside that in my test $orderBy combined with $top also worked.
Nov
22
comment Creating folder is not possible in app web in sharepoint?
What does makeProperUrl look like?
Nov
22
comment get list of all users SharePoint using REST API
You ask how to get users, yet your example code is about getting items. I'm not sure if I should show you how to get user in a field (with $expand) or how to get a user by id (from /Users). Sorry, but your question makes no sense to me
Nov
21
comment Get last created item from SharePoint List using REST
@AmalHashim I think you need ID instead of Id. @james-grizzle why would Created be better than ID, wouldn't it be the same? And Modified would not be the last created item.
Nov
21
comment How to properly cache, validate, refresh Access Tokens?
Beside ajax the default app setup should redirect user to SharePoint to refresh the token (and then be automatically redirected back to your app) - so can't you do the same? If your Web API controller fails to auth with ClientContext simply tell your client script to refresh the browser, which again will trigger the whole refresh-token-cycles