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

learn more… | top users | synonyms

0
votes
1answer
127 views

Tagging documents in SharePoint

Can we tag individual SharePoint documents? If so, how can we read the tags of a document using SharePoint object model?
0
votes
1answer
1k views

how can i get Web Analytics database name with Object Model?

First let me say, that all of we doing in sharepoint is base on the object model, so i can go to Central Administration and get my "Web Analytics Service Application" Database Name and Server Name, ...
0
votes
2answers
622 views

Add site column to site content type error

var objWeb = properties.Feature.Parent as SPWeb; Guid webPublishingGuid = new Guid("94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb"); SPFeature feature = null; SPSite site = objWeb.Site; feature = ...
0
votes
1answer
156 views

SharePoint Web Part Gallery details of each web part

When using SPWeb.GetCatalog(SPListTemplateType.WebPartCatalog), it returns an SPList which of course contains a SPListItemCollection of the web parts in the web part gallery. When looping through the ...
0
votes
1answer
514 views

Re-order Content Types for a List in code

Has anyone been able to re-order content types for a list in code? If I'm given a specific content type, I want to make it the default in a list, by re-ordering the SPList.ContentTypes collection and ...
0
votes
1answer
998 views

Add an item with lookup field using object model SP2010?

Can someone please post sample code which shows how to deal with a lookup column during an item insert (using object model). Here is the basic framework for an insert: SPListItem oListItem = ...
0
votes
1answer
235 views

SPListItem IsNew Functionality?

In OOB SharePoint, many of the lists render a "New" graphic when an item is "New". I found this posting which indicates how to determine this from an XSL file: ...
0
votes
2answers
926 views

SPList.GetItems(query) does not return SPListItems where the permissions are not inherited

I'm using the following code: protected void TraverseFolder(SPList list, SPFolder folder) { SPQuery qry = new SPQuery() { Folder = folder }; SPListItemCollection listFolderItems = ...
0
votes
1answer
31 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
42 views

Query user details using employee ID

Is there a way to fetch user details from user profile service using employee ID?
0
votes
0answers
99 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
38 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
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
92 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
84 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
1answer
52 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 ...
0
votes
1answer
199 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 ...
0
votes
0answers
281 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
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
132 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
2answers
564 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 ...
0
votes
0answers
295 views

SPListItemCollection.EnsureListItemsData seems to deadlock

I'm trying out multithreading with the SP2010 Object Model and I've run into some weirdness. My application currently does the following: Opens an SPSite and uses AllWebs.WebsInfo to build a Guid[] ...
0
votes
0answers
393 views

Cannot remove file <x>. Error Code: 16388

I've written a tool top copy/paste/delete files accross site collections and then remove the original version from the recycle bin. The method to copy the files is: public bool ...
0
votes
1answer
339 views

Sandboxed Solution to create a Document Library and enabling manual declartion as record

I need to create a SharePoint Feature, when activated needs to create a Document Library and then enable the manual declaration as record. Following is the code which is working fine in a Console ...
0
votes
0answers
202 views

List item attachments not showing up when accessed through the object model

I've got some list items which have manually attached (through the web interface) files and need to access these files on server-side. Whenever I look at SPListItem.Attachments though, it always shows ...
0
votes
1answer
58 views

What is UpdateListCompleted and why isn't it documented?

I've been messing around with the SharePoint List web service and I came across an event called UpdateListCompleted. I thought this might be of some use for the project I am working on so I ...
0
votes
0answers
56 views

Save MasterPage to file system is not bringing Webpart data

I am saving some masterpages to the file systems in some build scripts to automate the process of building deployment packages. This is what I am using to save the masterpages and layouts: using ...
0
votes
1answer
102 views

Automatically add a folder (document set) by code (generating the name also by code, without the user inputting the name)

I want to know if it’s possible to write en Event Receiver in VB for automating the creation of a document set: the user only click “new document set” and then the code generates the document set with ...
0
votes
1answer
2k views

GridView control - paging with linq. Where is objectDataSource?

I have visual web part with custom logic which retrieves me strongly typed list (not SPList -> .NET list object) which than I bind to gridview which has paging enabled. That works fine. Problem is: ...
0
votes
1answer
114 views

Proper way to retrieve list data asynchronously?

I have done this in the past using jQuery's ajax function and the SharePoint web services, but I'm curious if it is considered a better practice to use the Javascript Object Model? Also, is it secure ...
0
votes
1answer
249 views

RefinementWebPart - UseDefaultConfiguration property

I'm trying to create a filter dynamically through code, and for that I need to set the property UseDefaultConfiguration to false. However, just this simple thing below causes the webpart to "hang" on ...
0
votes
2answers
320 views

Sharepoint 2007 Current User ObjectModel

I'm trying to use the object model of Sharepoint 2007 to make some changes over a list and read users and groups web settings... For that I developed a Web Service (WCF) that is stored in the same ...
-1
votes
1answer
39 views

Common XML file for a SharePoint farm enviroment

We have create a object model DLL and display some result on based upon XML file stored on physical disk on dev box its working fine. Issue with our production enviroment is that we have four server ...