Reputation
4,696
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
2 11 25
Impact
~257k people reached

2d
comment Issue facing for Sharepoint online Authentication using javascript
If you make a proxy or a proxy-like service you only need CORS for this if you put it on another origin, but since you would control the proxy that wouldn't be a problem
Jul
2
comment Issue facing for Sharepoint online Authentication using javascript
Same-origin policy is browser only. To implement CORS you need server-side implementation as well. You could perhaps use a proxy (on same origin)
Jul
1
comment Issue facing for Sharepoint online Authentication using javascript
I don't think extSTS.srf supports CORS, I'm not sure what the author of your link used for testing, we could perhaps ask him: @pholpar ? I found another solution using RST2.srf, but judging from the comments it seems to have the same problems.
Jul
1
comment Issue facing for Sharepoint online Authentication using javascript
Your first problem is Same-origin policy
Jul
1
comment REST Call to get DefaultNewFormUrl
First of all it's /Lists/, secondly what do you mean by <List Name>? You need to query for the list, e.g., with ID or Title
Jun
18
comment Get current logged in user and display it on the Site as “Hello (Username)”
Note: Guessing you use jQuery in your example (based on $.ajax). You can use CurrentUser as end point. You can use $.getJSON because OP is on SharePoint Online (no need for odata type). You can use jQuery to select and set value on element. E.g., $.getJSON("/_api/Web/CurrentUser").done(function(user) { $('#id').text(user.data.d.Title); });
Jun
15
comment How to get server datetime without postback using JSOM or services
Have you seen sharepoint.stackexchange.com/a/130179/627 ?
Jun
14
comment How to avoid that the jQuery file loads after a custom js file? Sometimes I got $ not defined?
I can't see anything wrong with your code. Perhaps you could pastebin/gist the source of the whole page? Like Ctrl+U or "View source"
Jun
14
comment accessing and modifying page properties in sharepoint using javascript / CSOM / JSOM / Rest api
Does the code snippet work? Do you get the correct value? If so can't you just call currentListItem.set_item('webPartId', '...'); currentListItem.update()?
Jun
13
comment implementing fullcalendar with angular js
Where is ng-app="scheduleApp"?
Jun
12
comment Best practice to minimize/compress/bundle css and js files in VS SharePoint solutions?
I using node.js an option? We use gulp and we're quite happy with that
Jun
11
comment Best practice to minimize/compress/bundle css and js files in VS SharePoint solutions?
@Naveen if you add web essentials to your answer I will +1 :)
Jun
11
comment Communication betwen sharepoint apps on different pages
If you want to have them on different pages my solution would not work, then you would have to do something like what @kesava mentions, although then you need to deploy a C#-project externally (a lot more to it than a simple SharePoint hosted app) - could also look at other options, e.g., what about opening and closing a firebase connection (hacky)
Jun
11
comment Set Managed Metadata Values via REST
Ah I see. Well I suspect my solution should work as well, as I'm using it in production, but I can update the answer with your fix as well, I think it is a neat thing to know about
Jun
11
comment Set Managed Metadata Values via REST
So the solution was to use my snippet, but remove __metadata? I'm sorry but I have a hard time believing that should work, unless, are you on-premise?
Jun
11
comment Set Managed Metadata Values via REST
Just do this: itemEntry.__metadata = { type: 'SP.ListItem' }; And no you don't have to use ngresource
Jun
11
comment Set Managed Metadata Values via REST
Yes that is fine for the field itself, I'm talking about itemEntry, or whatever you use as post body
Jun
11
comment Set Managed Metadata Values via REST
Did you add { __metadata: { type: 'SP.ListItem' }} to itemEntry? You might have to send the actual type as well, you can get this from /_api/Lists('...')/ListItemEntityTypeFullName
Jun
11
comment Set Managed Metadata Values via REST
Use your dev tools network-tab to look at the error message (or catch the error, or use fiddler).
Jun
11
comment Set Managed Metadata Values via REST
That would be a new error. In your question the error message is specifically about Label, which makes sense. Do you try to set a property value in the same manner as you were trying to set Label? (Perhaps pastebin/gist your code, as I suspect it differs from that in your question)