sharepoint-api

How do I check if a Sharepoint Document Library has the Require Approval flag set, using the Sharepoint API ?

Hi It would also be useful to be able to check the "Requires Checkout" flag as well. I thought it might be a property on the SPDocumentLibrary object, but I can't see it. Do I need to look in one of the admin namespaces...? Cheers Matt ...

How to reference two versions of an API ?

Hi I have a need to reference two different versions of the Sharepoint API dll. I have a webservice that needs to run under both Sharepoint 2 and Sharepoint 3, but also needs to work with new features provided by the Sharepoint 3 API (Checkout and Content Approval) What is the best way to acheive this - I'm currently leaning towards h...

Easiest way to extract SharePoint list data to a separate SQL Server table?

Edited: What is the easiest way to scrape extract SharePoint list data to a separate SQL Server table? One condition: you're in a work environment where you don't control the SQL Server behind the SharePoint Server, so you can't just pull from the UserData table. Is there there any utilities that you can use to schedule a nightly ext...

Sharepoint: is performance of iteration through all subsites bearable?

Hi all, I need to create feature which will iterate through all subsites of site collection and add some sample content to each of them (sample content=new pages,images,documents,possibly some lists). There is solution that uses recursion to loop through sites (it can be found here). So i'm asking: Did any of you implemented somethin...

Document Library Versions.aspx in Sharepoint

1.I have a user that wants to view the current items version history on the dispform.aspx(Item Details) 2.The version history must display all metadata for each version. Library has 5 columns and I need to display the data in those columns everytime the version changes. I have been trying to get the version information using SharePoint ...

Sharepoint Workflow Fails When First Run But Succeeds When Run Manually

We are using an infopath form that when submitted is supposed to fire off a custom .NET workflow. Basically, the information within the form is used to create a new sharepoint site. What I am seeing happen is that the first time the workflow runs (which is automatic after the form is submitted), the workflow errors out. When I run the wo...

How to programmatically destinguish between WSS and MOSS

I need to know if I am working with SharePoint Services or SharePoint Portal Server when using the SP API. Is there a way to do this in code (C#)? ...

Error when trying to load XML from a Sharepoint Web Services call into an ASP.NET Gridview

I'm getting the error: Illegal characters in path. when trying to load XML, using XPath, into a gridview's datasource in the PageLoad function in the code-behind of an ASP.NET page I'm building. Does anyone know what this error means? The XML coming in from the Sharepoint Web Services call is: <?xml version='1.0' encoding='ISO...

Sharepoint Lists.GetListItems sorting

Hi, I am making a call to Lists.GetListItems web method of sharepoint through my c# code. Is it possible to get sorted list from the sharepoint? Or do I have to sort it after retrieval in my c# code? I was not able to find any option in query or queryOptions. Thanks. ...

Removing ';#' from SharePoint ListItem data

In SharePoint many fields id-value pairs that are formatting like the following id;#value. This is further complicated with fields like multi-lookup where when extracting the value of that field can yield results like id_1;#value_1;#id_2;#value_2;#id_3;#value_3 I am wondering if there is any known built in function that will simplify t...

properties.ListItem is null on event ItemCheckingOut

I am having the weirdest error. If anyone can give me hints, I've found nothing relevant with Google. When I hook the events on ItemCheckingOut on a Document Library (TemplateType=101) with 6 items inside, properties.ListItem will always be null for all those items. This never happened before. The problem seem related to the fact that...

How did I get multiple lists with the same name in my SharePoint site?

I have a SharePoint site that's being created from a custom site definition. The site definition has the following Features: A custom content type. A custom list template whose schema.xml file refers to that content type. A list instance feature which refers to my above list template feature. During the site provisioning process, I...

How best to determine if a given url represents an actual SharePoint web site

I have an arbitrary url. I know this url represents some path on my local SharePoint server. With the SharePoint API, I want to know if there is a site corresponding to this url. What's the best way to do this? I thought this should work: using (SPSite site = new SPSite(url)) { using (SPWeb web = site.OpenWeb()) { bo...

SharePoint SPFolder.SubFolders.Add not actually adding a folder

I have a couple document libraries that are just standard libraries -- no associated custom content types or anything. I am trying to add subfolders to them, and in some cases it just doesn't work. SPFolder parent = library.RootFolder; SPFolder child = parent.SubFolders.Add(subfoldername); parent.Update(); bool exists = child.Exists; ...

SharePoint and <identity impersonate="false" />

I would like to use integrated authentication to access a SQL database from a web part. It should use the IIS Application pool identity. By default you will get the error: System.Data.SqlClient.SqlException: Login failed for user 'SERVER\IUSR_VIRTUALMACHINE'. Because in web.config impersonation is set to true: <identity impersonate=...

Regarding SPLongOperation Object In SharePoint 2007

I am using the SPLongOperation Object in my project to introduce a delay while navigating to a new page.The in-built page uses the default css styles and branding. I want to customize this page design and apply my own theme and branding. Please tell me how to apply a custom master page to the page which displays the SharePoint 2007 Spi...

"ASP.NET MVC" CMS in Sharepoint Services

I'm evaluating the options for a CMS in ASP.NET MVC. I'm currently working on a multi-tenant app that requires CMS funtionality. I've been looking at N2, Mojoportal etc, but I'm also interested in what SharePoint Services could bring to the table. Specifically I don't want a SharePoint site but rather I'd like to potentially use the shar...

SharePoint many-to-many strategies

I have a SharePoint site collection that contains a custom site definition and a couple dozen deployed sites for a "Project". Each project contains many "Documents" (each represented by an actual document and a site about the document). So, currently that relationship is one Project to many Documents, and my current sharepoint configur...

Sharepoint doing an automatic discard checkout - losing changes!

Scenario: Through web interface, I check out and edit a file. I exit my (non-office) application. My application asks if I wish to check in, and I reply no. Document with my changes remains checked out, present in my SharePoint Drafts folder, and present in the registry under HKCU\Software\Microsoft\Office\Common\Offline\Files I go b...

SharePoint, Workflow and Web Services - restart workflow

Can you restart a workflow or push a workflow to its next step using SharePoint Web Services? If so which web service do you use? If you change a field like "Status" and the workflow uses this to know what it should do next... will it "nudge" the workflow forward? ...