API for interacting with SharePoint from .NET code deployed to the server.

learn more… | top users | synonyms

0
votes
1answer
50 views

How to understand SharePoint's “All Files” folder structure?

When I open SharePoint Designer, I can usually depend on using the "All Files" tab to find what i need. But I've never really understood what this thing is. I can't seem to find a similar file ...
0
votes
1answer
18 views

Is there a way to use the same method to read both an SPListItem object and SPListItemVersion object

I'm using SP2010 Server with C# for development. I'm currently writing a method that will read a couple of values from each version in a document's history. Ideally I'd like to use the same method ...
0
votes
1answer
98 views

Object Model List all users with full control on a sub site in SharePoint 2013?

If I have a sub site URL and a user with Site Admin, can I list all users in that sub site that have Full Control at that level? Any C# code sample?
1
vote
1answer
16 views

remove column from showing up in document properties

Which property in the object model do I use to tell an SPField not to show up in the document properties in Office integration? I tried ShowInEditForm but that didn't work. i want my Status column to ...
0
votes
1answer
37 views

How do I use the object model to update quota values?

Reading this doc I'm confused by the following paragraph: If you change the values for a quota template, those changes apply only to new site collections to which you apply the template. ...
0
votes
0answers
48 views

Query user details using employee ID

Is there a way to fetch user details from user profile service using employee ID?
0
votes
2answers
64 views

Add file to subsite with C# knowing only URL?

I would like to use C# to add a file to a library in a subsite. I believe SPWeb will only reference the site I am on. In an ItemAdded eventreceiver, I want to use something like SPFolder ...
5
votes
2answers
175 views

SharePoint App VS Object Model

For designing solutions I am confused with whole Apps concept in 2013. What is Microsoft's guidance for when to use a SharePoint app and when to go for a traditional client or server object model ...
0
votes
0answers
119 views

TermSetItem.Terms does not load properly?

I am attempting to write a PowerShell script to extract taxonomy entries from one environment to import them into another. I'm running into a problem where one of my Term Sets' Terms property is not ...
0
votes
1answer
39 views

problem getting date time

I am using the CSOM in javascript. I have a list which contains 3 text types and 2 date types. When I use: var listEnumerator = this.listItems.getEnumerator(); var collection = ...
0
votes
3answers
563 views

count items in a list javascript CSOM [duplicate]

I am wanting to count the number of items in my list. Using CSOM in javascript I have tried it but my code doesn't work. Where am I going wrong. Here is my code: var clientContext = new ...
0
votes
0answers
23 views

Linking a js file into a blank page in sharepoint then count how many items in a list

I have created a new page on my sharepoint site. I have embedded some html using the embed code <!DOCTYPE html> <html> <body> hello </body> </html> I have a js file ...
0
votes
1answer
146 views

getting data from a list sharepoint object model CSOM javascript

I have a list which I want to get information from using javascript. It doesn't show the list just certain things like how many items in the list. I am completely new to sharepoint so don't have a ...
2
votes
1answer
654 views

Programmatically retrieve the MySite URL of user

Let's say that we have the SPUser object of current user - how do I programmatically retrieve his mysite URL path, for example "mydomain:8080/personal/saltarski"? Currently I do it through string ...
2
votes
3answers
2k views

Get absolute URL to listitem's default display form

I need to have an absolute URL of a listitem's display form - currently I do it the following way: On http://mydomain.com/: item.ParentList.ParentWeb.Url.TrimEnd('/') //"http://mydomain.com" + "/" ...
1
vote
1answer
96 views

PowerShell command to get list of documents where users x and y has permissions?

I would like to get a list of documents where user x and y has permissions. Can someone help me? I would like to do it in either PowerShell or C# code.
1
vote
1answer
49 views

Add attachment to Outlook from SharePoint Library

We have a requirement to send Emails from SharePoint with attachments from Document Library. We have been able to achieve this. But now the requirement is client want to open outlook and add ...
3
votes
2answers
83 views

Getting spuser from multiple types of information

If this sounds confusing it's because I'm al little confused on it myself. Basically I have an application (originally written by someone else but never finished) that needs to perform various actions ...
5
votes
1answer
230 views

How to programatically determine if 2013 running in '14 compatibility mode' (SP 2010)

How can you programmatically determine if a site collection is running in '14 compatibility mode' (so it looks like SharePoint 2010)?
1
vote
0answers
51 views

Files.Add fails for users with Contribute

I am using the object API to upload files. In paticular I am doing this.. SPFile file = list.RootFolder.Files.Add(filename, fileStream, author, author, DateTime.Now, DateTime.Now); The problem is ...
2
votes
1answer
274 views

Difference between GUID and UniqueId

What is the difference between GUID and UniqueId? They are both globally unique ids and from the client side we can see they are not the same: ctx = new SP.ClientContext(); web = ctx.get_web(); list ...
0
votes
2answers
386 views

SharePoint Online: Getting Current User Information

What is the best way to get the current users information. With the UserProfileService unavailable in SharePoint Online what would be the best method for getting a users information. Client was ...
1
vote
1answer
357 views

Transfer Multiple people picker column's value from one site to another

I have a column of multiple people picker called Likes in 2007 sharepoint site which stores n number of people. Now i want to programmatically transfer it's content to sharepoint 2010 site. Problem ...
2
votes
1answer
454 views

Programmatically get the central administration site SPWeb using server object model

Like in the title - is there a method of getting it without supplying the URL?
0
votes
1answer
103 views

How to create 2 level left navigation with code

I need to create a function which will build 2 level left navigation programmatically. Function should take name/title and url. Can some body show me how to create using SPNavigation or any other SP ...
0
votes
1answer
160 views

Setting permissions on a folder

2010, c# server object model I'm trying to programmatically assign permissions to specific folders in a document library (see my original post here) but I'm hung up on selecting a folder as an ...
3
votes
1answer
163 views

Needed help to build caml Query with multiple <And>

I am getting a query from list view by view.Query i got the following <QUERY> <GroupBy Collapse="TRUE" GroupLimit="100"><FieldRef Name="AlertGrp" /></GroupBy> ...
0
votes
2answers
151 views

2010 - SPFolderCollection not updating with new items

2010 Enterprise, VS2012, c# server-side Here's the situation: I have a method that gets an SPFolderCollection object from a document library. It then loops through the list checking for a specific ...
1
vote
0answers
175 views

Programatically adding All Authenticated Users

I want to give all authenticated users read access to a list (that stores some configuration for a feature). "All Authenticated Users" is a special concept in SharePoint, but the implementation ...
0
votes
3answers
81 views

SPFolderCollection valid index arguments

SharePoint 2010, c# server object model, VS2012 Long story short, I'm trying to fetch a folder of a document library, create a new folder in it from an array of names, then fetch the new folder via ...
3
votes
2answers
891 views

SPList.GetItems(SPList.DefaultView) returns only visible items

WSPList.GetItems(SPList.DefaultView) only returns the number of items set to return in throttling settings on the view. I'm aware that I can increase the item limit for the view, but the users are ...
4
votes
3answers
518 views

How to programmatically modify item level permissions prior to first save?

I've got a situation where there are strict permissions requirements on an a list of which I already have written a custom form. The requirement is that upon creation, based on metadata, only certain ...
0
votes
1answer
88 views

SPQuery AppendOnly field returns null

I have a list with an custom append only field for collecting comments from supervisors. When I query the list using SPQuery I always get null back for the value of the append only field. I have ...
1
vote
3answers
128 views

Can I programatically move sites or content between 2007 and 2010?

Using the SharePoint Object Model on a SharePoint 2007 environment and the remote object model to talk to a SharePoint 2010 environment would it theoretically be possible to migrate sites or content ...
0
votes
1answer
54 views

ProcessBatchUpdate has no effect

I have an application I am working on that uses an Event receiver to propagate metadata to a document library. I am trying to use SPWeb.ProcessBatchUpdate to copy the metadata back. my code looks like ...
1
vote
1answer
653 views

Programmatically get port 80 Web Application Default URL for Farm?

How would I programmatically get the port 80 Web Application Default URL for the Farm?
3
votes
1answer
87 views

How do i “Refresh” each site collection's permissions?

My network admin have deactivated a lot of users from the Active Directory, and recreated them using the same username but with a different OU, Now the SP 2010 does not recognize these users or their ...
1
vote
2answers
54 views

Track users opening files from the farm?

Our internal auditors have made a request to produce a regular report that shows when users access certain files. With this in mind I was wondering - is there a way in the object model or otherwise ...
0
votes
1answer
210 views

TimerJob editing workflow and web config - Consuming external webservice

I have a list that is attached to a workflow (State machine, VS2010, SP2010). There is an OnWorkflowItemChanged activity that will check if a column of the list has been changed. If it changed, it ...
1
vote
2answers
58 views

Accessing the version on an SPFolder

Within a Document Library with versioning turned on, I noticed that if I create a folder and "View Properties" that there is a "Version: 1.0" that is listed as a property along with "Created By", etc. ...
0
votes
1answer
51 views

Ghostable via Object Model

Is it possible to set a file as Ghostable/GhostableInLibrary via the Server Object Model? I don't see any properties on SPFile that seem to fit the bill. I know you can do this via an XML module, but ...
0
votes
0answers
302 views

How can I programmatically upload video( using video url of external sites ..eg.youtube) into Asset Library in SharePoint 2013 using obejct model?

My question is: How can I programmatically upload video( using video url of external sites ..eg.youtube) into Asset Library in SharePoint 2013 using obejct model? Please advise. Regards Sunny
0
votes
2answers
195 views

Adding extension methods to SharePoint types

Heads up, this is very much a beginner question. My SharePoint experience is primarily with working with SharePoint designer and powershell. I've never touched Visual Studio or anything to use custom ...
0
votes
1answer
40 views

Approving document library items from Object model in WSS 2.0

What is the correct way to approve an item in WSS 2.0 through the object model? I have some code that was recently modified to auto approve items that met certain criteria by another developer. That ...
0
votes
1answer
74 views

Best way of customizing SharePoint List forms

What is the best way of customizing SharePoint List forms(NewForm, Edit form, Display form). Application page - object model Visual web part - object model SharePoint Designer 2010 - ECMA script ...
0
votes
1answer
142 views

where i can find trace for item.systemupdate()

I am working on a project which was initially developed by someone else. few of my list items are getting updated but i am not getting anything in version history. I believe that some schedule job is ...
0
votes
1answer
36 views

Longest practical filter for an alert

Environment: SP2010 Enterprise SP1, Server/SQL 2008 R2, VS2012 When building alerts through object model, what is the longest or most complex CAML filter that can be applied to them? Can they be as ...
1
vote
1answer
231 views

To deploy page layout with feature at the same time of adding content type, the content type Id issue

First let me describe my situation: Now I'm using object model to add two content types (inheriting Pages content type) using the FeatureActivating methode in the Feature Receiver. in the same ...
0
votes
2answers
602 views

powershell - The user does not exist or is not unique

When I try to add user/group using SharePoint OM or Power Shell script I'm getting the following error. In this example S-9-9044-V is an AD Group. The user does not exist or is not unique $web ...
1
vote
0answers
67 views

Distinguish Event Receiver Firing From Web UI or From Code

Think of some event receiver methods like ItemAdded, ItemDeleted etc. How can I detect in my event receiver code if the item adding/deleting is being triggered from the web UI or from the object ...