Questions tagged [sharepoint-object-model]

SharePoint Object Model exposes SharePoint API. This is broken down into the "original" Object Model and the newer (since SP2010) Client Object Model.

SharePoint Object Model exposes SharePoint API when direct access to the Content Database is allowed.

This is different than the SharePoint Client Object Model - for that, see "sharepoint-clientobject".

49 questions
1
vote
2 answers

Get user from sharepoint group and redirect

My requirement is when someone login to site and if he belong to 'owner' group it need to redirect immediately to specific site and if he belong to member group then need to navigate/redirect to same specified site other page.
1
vote
0 answers

Change SharePoint 2013 sub-site color programmatically

I have a main site collection that is using the stock Publishing Site template in red. All sub-sites are inheriting the master page and theme. All sub-sites are using the Project Site template. I am creating these using the Server Object Model. All…
1
vote
1 answer

Needed help to build caml Query with multiple

I am getting a query from list view by view.Query i got the following
1
vote
1 answer

How to get changes from sharepoint 2010 client object model?

Below is the code: ClientContext context = new ClientContext("http://SPSite"); context.Credentials = new NetworkCredential("user", "pwd", "domain"); ChangeQuery cq = new ChangeQuery(true, true); …
1
vote
1 answer

Set programmatically created XML document to open with InfoPath template in SharePoint

I'm having a problem getting XML documents that I am creating programmatically and adding to a form library in SharePoint to open with an InfoPath template instead of just opening as plain XML documents in Internet Explorer. Basically, I have a web…
1
vote
1 answer

Is web.AllowUnsafeUpdates default value always false in Sharepoint?

This is my sample code: SPWeb web = SPContext.Current.Web SPList list = web.Lists["TestList"]; try { web.AllowUnsafeUpdates = true; list.Title = "Test"; list.Update(); } finally { web.AllowUnsafeUpdates = false; } I removed…
0
votes
1 answer

The settings for this list have been recently changed. Refresh your browser before editing this list

I have a C# application from which I am uploading documents to a SharePoint 2010 Document Library (with version history enabled). The line of code I am using to upload the document is the one below: Web.Files.Add(destinationURL, documentFileStream,…
0
votes
1 answer

Sharepoint 2010 - Object Model - Download DocumentSet Programmatically

A code snippet of how i can download a documentSet programmatically using the sharepoint object model would really help. What I am trying to do is - Given the sharepoint site, log in with the user default credentials - look for the document…
Tarun Arora
  • 4,692
  • 4
  • 30
  • 40
0
votes
1 answer

SharePoint And Excel Integration

I have an interesting problem. I have several Excel sheets that our users use to submit requests. We now want to automate them. We have created custom web parts and lists and got rid of the excel sheet. However, many users are still using Excell…
0
votes
4 answers

Reading sharepoint site through object model within ASP.NET website produces errors

Scneario : Webserver with ASP.NET site. Installed Sharepoint 2010 SQL Express edition on the same server. SQL resides on the same box. The ASP.NET runs on appPool1 with identity "SiteUser". The Sharepoint site that was created by the wizard has…
0
votes
2 answers

Removing Workflow from the list using SP Object Model in SharePoint 2010

I am interested in removing a Workflow from the list using the SP Object Model. How can I do this? I am not having much luck with Google today!
0
votes
1 answer

SharePoint 2007 : How to programmatically upload binary file into Document Library?

I encounter a problem to programmatically create an item into Document Library in SharePoint 2007. Below is my code fragment, perhaps you might able to point out what is my error: SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite…
sams5817
  • 1,037
  • 10
  • 34
  • 49
0
votes
1 answer

How to Creatie Multiple Site Collections and Subsites under a already Created fresh Web Application. Sharepoint 2010

I have a fresh web application already created. Now I just want to Programmatically add Site Collections and Subsites to the Web Application using the console application. Any Help appreciated. Regards, Navish
0
votes
2 answers

Copying Content Types across SharePoint servers

I am developing a Windows application that will allow SharePoint administrators to copy a content type from one server to another (across two SharePoint environments). I am at a point where I have the content type information that I want to copy.…
Tom
  • 510
  • 1
  • 7
  • 24
0
votes
1 answer

Get value from taxonomy field

Trying to get the selected value from a taxonomy field in sharepoint online using CSOM. But when getting the taxonomyfieldvalue it is null, why? if (listitem.FieldValues.ContainsKey("Division")) // Returns true { …
Phrone
  • 21
  • 4