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

learn more… | top users | synonyms

0
votes
1answer
18 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
103 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
45 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
30 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
61 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
15 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
34 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 ...
0
votes
1answer
93 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
340 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
47 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
36 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
67 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
135 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
30 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
149 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
1answer
273 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
225 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
245 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
66 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
104 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
146 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
113 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
99 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
47 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 ...
1
vote
2answers
543 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
510 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
0answers
216 views

InfoPath - update existing SharePoint List Item using SharePoint Object Model

InfoPath 2013 browser form - a secondary data source loads the list of items that will be updated (changed) on an On After Change Event. It is only changing the value of the 'Status' column in every ...
0
votes
1answer
75 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 ...
0
votes
0answers
108 views

Reading a specific image rendition programatically returns the original image

I've built a field type that inherits from RichImageField because I wanted to add validation on the width and height of the images referenced in that field. And it's working great. When I moved to ...
0
votes
0answers
145 views

Failed on start (retrying) when workflow triggered from console app

I have a splist which has a workflow associated with it but only set to manually trigger. The workflow is a simple email sender created with SPDesigner. Items are added to the list by anonymous users ...
1
vote
3answers
92 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
41 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
533 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?
0
votes
0answers
413 views

SPWeb.GetFolder() returns SPFolder with no files or sub folders

I'm encountering a strange problem on SharePoint 2007 where the following script correctly enumerates files and folders on my QA and DEV sites, but not on my Production site. Why is SPWeb.GetFolder() ...
3
votes
1answer
79 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
50 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
165 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
51 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
44 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
233 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
159 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
38 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
69 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
112 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
35 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
209 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
449 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
62 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 ...
1
vote
2answers
234 views

SharePoint Data Modelling Tool

I plan to develop a data model for a SharePoint application that we would like to bid out for development. Is there a data modelling tool that is preferred to be used with SharePoint, like it can ...
1
vote
1answer
133 views

Stale QuickLaunch after SPWeb.Title update and Redirect

Thanks for taking a look. I have a text box and a button on a SharePoint aspx page which will update the current SPWeb's title. The control then redirects the user to a different .aspx page in the ...