Reputation
4,481
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
2 10 25
Newest
 Yearling
Impact
~228k people reached

Feb
19
comment Wait for _spPageContextInfo to initialize
I have a hard time believing that setInterval is slower, considering jQuery(document).ready will wait until the whole DOM is parsed, while setInterval can "jump in there" instantly after _spPageContextInfo is defined which is way before the whole DOM is done parsed
Feb
19
comment Wait for _spPageContextInfo to initialize
@GuilhermeSehn it is simply <script>_spPageContextInfo={...}</script>, which is placed later in the markup than my normal <script src=".."></script>, which again means it is evaluated at a later time in the DOM - and yes, I must indeed Wait for _spPageContextInfo to initialize, but what is the fastest and ultimately the best way to do this?
Feb
19
comment Copy File site collection to subsite with REST API & Javascript
The problem is that you use jQuery, which does not have a binaryStringRequestBody, and the blog you link to use SP.RequestExecutor. Also see this answer for good examples. Also note there are many other differences, such as jQuery using data property for data, while executor use body
Feb
19
comment web api query with $filter return HRESULT : 0x80131904
Is the field multi lookup on the other environment? Shouldn't your query use something like MyLookupField/Title eq 'something'?
Feb
19
comment JSOM function not getting called
I'm a bit confused, you use SOD to wait for sp.js then you call getSWDocs, but in this file you define getSWDocsSuccess ... does this mean getSWDocs calls getSWDocsSuccess?
Feb
16
comment How to access list of website users from SharePoint hosted app?
@crclayton var userArray=[];var e = users.getEnumerator(); while(e.moveNext())userArray.push(e.get_current());
Feb
16
comment How to access list of website users from SharePoint hosted app?
How about /_api/Web/SiteUsers or context.get_web().get_siteUsers()?
Feb
13
comment JSOM Anonymously CAML query list items
Site settings -> Site permission -> Permission levels
Feb
12
comment How to get JSON column “Title” in Java
Call MERGE (or PATCH) on the item with Title and __metadata present. e.g., MERGE .../Items(42) with data {"__metadata":{"type":"SP.ListItem"},"Title":"derp"}
Feb
12
comment JSOM Anonymously CAML query list items
Did you add permission for the levels "Use Client Integration Features" and "Remote Interfaces"?
Feb
10
comment In SharePoint JSOM, how to get a column in the list by name?
Why can't you just make executeQueryAsync fail to tell you it does not exists? Something like this: gist.github.com/eirikb/1b1186ab2c7dd0370864
Jan
30
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.