3,447 reputation
2721
bio website
location Norway
age 27
visits member for 4 years, 3 months
seen 23 hours ago

Apr
24
comment Where to run this code on sharepoint 2013
Console application in Visual Studio?
Apr
24
comment Get grouped items by “Group by” and applied pagination
Why would GroupBy limit the amount of items? It is RowLimit which limits the amount of items. Even in other libraries where IQueryable supports GroupBy such as in Entity Framework all items are retrieved on GroupBy, just grouped by some expression
Apr
24
comment Get grouped items by “Group by” and applied pagination
It should simply group the items already returned from your SPQuery. And if you limit this to 10 items as you mentioned in your question then it should be rather trivial
Apr
24
comment Get grouped items by “Group by” and applied pagination
If you are going to use limit anyway because of your paging I doubt there will be any performance issue. I at least don't think I see much difference between GroupBy().Select() and OrderBy() which is basically what you get when the result from SPQuery is flat anyway
Apr
24
comment query xml powershell sharepoint
What is '3;#0' anyway? I suspect it means $someItem["FolderChildCount"] is 0, but you need the '3', what is it?
Apr
24
comment query xml powershell sharepoint
I'm struggling to understand what you are trying to do, what I can decipher is that you want all lists of a SPSite which contains any item with the Title 'M' (guessing at Title)?
Apr
24
comment Integrate my web part in my sharepoint Site
What I meant was that apps does not support Web Parts, only Client Web Parts. Your host site can add Client Web Parts which are just iframes to your app at the app domain. In any case this is getting out of hand, I suggest you read up on the link I posted. Your question is about Web Parts, although you don't have and can't have Web Parts in your app so it is in all essence unrelated to your approach
Apr
24
comment Integrate my web part in my sharepoint Site
You can't deploy Web Parts in apps, only Client Web Parts (please see link) which are a bit different
Apr
24
comment Integrate my web part in my sharepoint Site
Since it is a Web Part it will be scoped for SPSite (site collection). Go to Site settings > Site Collection Administration > Site collection features, here you should find your feature and you can enable it. The name of your feature is probably something like Feature1, you can see the actual name under "Features" in your Visual Studio project
Apr
24
comment Is it possible to make SharePoint lists accessible cross domain using REST API?
There are possibilities for this, but first you need to consider: Will you use REST from C#? From console application or web application. Or from a browser, if so is using a SharePoint hosted app sufficient?
Apr
23
comment Integrate my web part in my sharepoint Site
How did you "integrate" you Web Part into your site? If you installed a WSP did you remember to enable the feature for the Web Part?
Apr
23
comment Finding items using content types
Does this code actually work? Don't you have to -ExpandProperty on Lists as well? And from where does $ContentTypes come? And what is .PM on a Content Type?
Apr
23
comment List and list item permission and security in Sharepoint hosted App
Are you able to remove read permission for the user, but still add items when going through JSOM or REST? If so, and I think that might be the case because of app permissions, you should be able to set item level permission for the user to access their own items on creation. Also, if you are able to retrieve items from a locked down list through the JSOM/REST app proxy you could just give some groups access (i.e., Manager) and forget about item level permission as you can retrieve items through the app
Apr
23
comment List and list item permission and security in Sharepoint hosted App
Can't you just go into list settings > advanced settings > item-level permission and set it to Create items and edit items that were created by the user?
Apr
23
comment SharePoint Hosted App secure content
I imagine this is Open Sans font from Google fonts, and if you open the CSS file there you can see it uses @font-face and src to the link you described
Apr
23
comment Does disposing SPSite dispose the SPWeb automatically?
Just curious, do you know how RootWeb is disposed by SPSite? When decompiling the SharePoint DLL I can't see where it is disposed at all. I think m_openedWebs are all disposed of properly, but RootWeb is not part of these. I know it is disposed, I just can't see where it is done
Apr
22
comment CSOM in FarmSolution
Are you building a separate web application, similar to an autohosted one, that will connect to your SharePoint and you want users to be able to authenticate to SharePoint through this web application?
Apr
22
comment XML code for List view
Might be duplicate of sharepoint.stackexchange.com/questions/62508/… , not flagging since I'm not sure, the methods are the same, but the question is slightly different
Apr
21
comment SharePoint Jquery Condition
Just a note to you and @Aveenav here is an alternative to fetching fields with jQuery that you might find interesting. It is clean and should actually be relatively fast, and best of all it works on internal names instead of title/display name. Works in 2010 and 2013 and default forms (will not work on custom forms)
Apr
21
comment Sharepoint List Issue
Updated the answer to get all distinct values from all items, see $values = ...