API for interacting with SharePoint from .NET, Silverlight, and JavaScript.

learn more… | top users | synonyms (3)

0
votes
2answers
75 views

How to rename a folder via csom c# in SharePoint List?

How can I rename a folder in a list via CSOM (c#). I tried it with: var folder = ctx.Web.GetFolderByServerRelativeUrl(folderRelativeUrl); ctx.Load(folder); ctx.ExecuteQuery(); var folderItem = ...
0
votes
1answer
23 views

Authenticate user with FormDigest via CSOM/REST

Our SharePoint 2013 farm is using Windows Authentication and exposed to the Internet. We have a webparts contains javascript AJAX call to another server with a different hostname. Intranet: ...
2
votes
2answers
3k views

Why does “sp.js” load only when I am editing a web part page?

I have created a page and would like to use some functions that require sp.js to be loaded, but it never seems to load unless I am editid the page (Site Actions -> Edit Page). Trying to find the ...
1
vote
1answer
26 views

Problem when updating user profile property using SetSingleValueProfileProperty

I am writing a C# application where I have to update a user profile property. I am using the following code: using (var clientContext = new ClientContext(serverUrl)) { var peopleManager = new ...
1
vote
1answer
25 views

Set content type of document when uploading using client object model

I am trying to use the Client Object Model in SharePoint to upload a document to a specific library. Right now I have it saving the document but I can't figure out how to specify the content type ...
0
votes
0answers
24 views

Sending E-Mails in On-Premises environments? (CSOM)

I'm working on an E-Mail function for a SharePoint 2013 provider-hosted App. The code I'm currently using: // Prepare the E-Mail parameters EmailProperties properties = new EmailProperties(); ...
2
votes
1answer
5k views

Properties when uploading Files using REST in SP 2013

After a lot of research I finally got uploads via REST working in SharePoint 2013. But I would like to provide additional properties to the Add Function like Title. This code works so far but the only ...
1
vote
0answers
28 views

SharePoint Online - custom ribbon tab on all pages

Is there a way to make custom tab available on all pages of SharePoint Online website? For SharePoint Farm solution you can register a Delegate Control and activate it on a server side like this: ...
0
votes
1answer
32 views

Sharepoint javascript object model, access denied error

I'm using JavaScript object model to retrieve data from a list located a root site. My code is as below: var clientContext; SP.SOD.executeFunc('sp.js', 'SP.ClientContext', ...
0
votes
2answers
653 views

Import bulk data (over 5000 List Items) into SharePoint

I have an Microsoft Office 2010 AddIn which imports Data into SharePoint. The tool creates a Dictionary with over 5000 Values. Every Value is a C#-Class with Data and represents a SharePoint List ...
0
votes
0answers
38 views

Jquery Async call issue CSOM

I am creating a custom Navigation using Termstore value. I am getting all term using JSOM like that function getTermStores() { context = SP.ClientContext.get_current(); var taxSession = ...
0
votes
1answer
445 views

Dynamically create metadata and associate it with File using Client Object Model

Is there any way to dynamically add metadata in the upload file. I am using the following code in this regard. File uploadFile = context.Web.GetFileByServerRelativeUrl(location); //check out to make ...
0
votes
1answer
797 views

Client Context executeQuery() works in console app but returns null object when executed from CRM Server

I have the function GetDocumentLibrary which must return a libray from sharepoint site. When I execute it from a Visual Studio Console Application it works and return the library with all ...
2
votes
1answer
899 views

How to open file in adobe reader using command line without checkout from Javascript?

I am working on print functionality. I am printing the PDF files (uploaded in SharePoint Library) using Adobe Reader command line from javascript. I am using ActiveX object to call the cmd. refer ...
1
vote
1answer
26 views

Enable item scheduling on a publishing library via SharePoint .NET client API

Does anybody know how to enable item scheduling on a publishing library via code (.NET Client API)? This can be done via the Settings UI for the library in Manage Item Scheduling. However, I can't ...
1
vote
1answer
96 views

Upload list item attachment using JSOM

I am trying to upload list item attachment using the below code. There is no error in the code and all the variables are present with proper values but in uploadFile method it goes to error handler ...
2
votes
2answers
710 views

Set request access email address through CSOM

In the server side object model it's possible to set the request access email address through the property SPWeb.RequestAccessEmail (MSDN). Since we are moving our SharePoint tenant to Office365 I'm ...
0
votes
0answers
25 views

Cannot query SP.UserProfiles.PeopleManager from the App Web via REST

I'm testing REST results in the browser with mixed results. The following URL returns the expected result: ...
1
vote
1answer
472 views

Copy files/folders between site collection and retaining metadata

I'm using SharePoint 2013 I need to copy files/folders/sub folders from one site collection to different site collection(basically archiving them). I need to do this remotely by using CSOM/JSOM. ...
1
vote
3answers
68 views

Getting List Column Order

I'm using the SharePoint 2013 JavaScript APIs, calling web.get_lists().getByTitle('ListTitle') and then list.get_fields() to create a custom search panel. However, the fields do not come back based on ...
0
votes
0answers
23 views

Manipulating SharePoint UI over an IFrame to add missing clientside Features

I stumbled across a requirement where I had to change the RequestAccessMail via clientside code. This property is not available via CSOM or JSOM. Feature Request There are several people who asked if ...
1
vote
1answer
36 views

Fetch list item attachment by name

I am trying to write custom code for list item attachments. As it is not allowed to overwrite them, I will check if file already exists. If yes, will delete and then upload again. I found a method ...
6
votes
2answers
1k views

Previous versions of ListItem with CSOM

When using Client-Side Object Model for SharePoint 2013, how can I access previous versions of List Item?
0
votes
0answers
55 views

SP2013 Adding custom webpart(sandbox) to a page programmatically using CSOM

I'm trying to add a webpart(sandboxed) to a page programmatically using CSOM. I've created a simple windows forms application and tried the below, it gives me error A first chance exception of ...
-1
votes
1answer
33 views

How to know what kind of permission (Full, manage, write) is used for the current App?

I planing to build an JavaScript library to manipulate SharePoint Lists and Items , which developer can use with there SharePoint Hosted apps, and I want to publish on CodePlex, anyway, this JS ...
0
votes
1answer
53 views

Office 365 pre-provision my site issue with Powershell

I am creating personal sites using powershell csom. My issue is on below line $loader = [Microsoft.SharePoint.Client.UserProfiles.ProfileLoader]::GetProfileLoader($ctx) I get following error. ...
2
votes
1answer
57 views

Get Parent term set id using JSOM

I want to get parent term set id in SharePoint online using term_parent.get_id(); in below code.I am getting all terms but unable to get parent term id.It is giving me error as Uncaught Error: ...
0
votes
0answers
27 views

Get\Set values from SharePoint 2013 custom fields

How Get\Set values from ListItem SharePoint 2013 custom fields using CSOM and C#?
0
votes
1answer
19 views

Retrieve users About Me (PersonImmersive.aspx) page from CSOM

Is it possible to retrieve the O365 About Me data (in PersonImmersive.aspx) via REST or CSOM ?
3
votes
2answers
133 views

SharePoint 2013 get all Taxonomy terms JSOM

I am trying to get a collection of terms under a term set so I can see which have custom properties. I have been searching for almost a week now and keep coming up with nothing. I found several ...
0
votes
1answer
22 views

Add list item only after workflow approval

Is there a way to restrict or hold the list item from adding into the list until it is approved? Once the user hits the save button from new user form, the workflow approval request starts and until ...
0
votes
1answer
509 views

Check-In & Checked Out files inside folder in Document library using Client Object Model

I am not able checkin/checkout the files in sub folders in the document library using client object model. Below is the code I am using. public void CheckOut()// CHECK OUT FUNCTION { try { ...
2
votes
1answer
463 views

SharePoint 2013: Creating custom list in SharePoint using CSOM

I'm having a difficult time creating custom lists using the SP JS API. Here's what I'm attempting to do: var lciTasksList = new SP.ListCreationInformation(); lciTasksList.set_title('ProjectTasks'); ...
0
votes
1answer
20 views

Can I [safely] change the code name/EntityPropertyName of objects?

We have several lists and columns that we've renamed overtime, and some of the lists/columns also contain spaces. This makes accessing these objects with the EntityProperytName through the CSOM quite ...
0
votes
1answer
1k views

SPServices - GetRolesAndPermissionsForCurrentUser

I have a list where one group of users is not allowed to delete items but they have view and edit permissions. All items in the list contain an attachment. However, users are not allowed to delete the ...
1
vote
1answer
448 views

how to update properties of item in doc set with client object model

I've been able to create doc sets and upload files to it with the client object model. I am having difficulty updating the properties of the files in the doc sets. Here is what I've tried: public ...
1
vote
2answers
4k views

CSOM move the files one folder another folder

I have to all files from one folder another folder using CSOM and C# Thanks for your replay Huge Wood my code is below var targetSite = new Uri("https://hello.com//teams/Worldwide_Site"); ...
0
votes
1answer
39 views

Sharepoint define search scope using csom

I have a sharepoint installation with multiple site collections, let's say siteA, siteB e.t.c I am using the following code to search in sharepoint using (ClientContext context = Connect()) ...
2
votes
1answer
473 views

Extract text from document in a SharePoint 2013 library

I would like to extract the text from documents stored in a SharePoint 2013 online document library. I have the document loaded using: ClientResult<Stream> data = file.OpenBinaryStream(); ...
-2
votes
0answers
27 views

ClientContext sharepoint to get allowed site for user

I'd like to connect to a clientcontext ` using (SP.ClientContext ctx = new ClientContext("spurl")) { try { //retrieve an other user and use this ...
1
vote
1answer
48 views

Get Sharepoint Permissions\Roles (custom) of a user from AD Group that is part of SP Group via CSOM

SharePoint 2013 + provider-hosted app. User is part of AD group. AD group is part of Sharepoint group. Sharepoint group has custom security permissions assigned. How do I check whether user has some ...
1
vote
1answer
19 views

How to change a list URL via JSOM?

I'm trying to make a JSOM utility that will allow me to alter the properties of pre-existing document libraries. So far I have successfully managed to update the list 'Title' and 'Description' ...
0
votes
2answers
22 views

Deleting items in object-model

How to add a new item to SharePoint list in server object-model using C#. This is my code and I want to delete just one item using listBox SPWeb web = SPContext.Current.Web; ...
0
votes
0answers
21 views

Is it possible to simply enable incoming email and set the email address using SharePoint 2013 JavaScript Object Model (JSOM)?

I know this can be done with C#, but I am restricted to a client (JSOM) only environment. I already looked at all the properties and functions of the SP.list (oList in the code below) object using the ...
0
votes
0answers
50 views

Set value of summary links column using CSOM in SharePoint 2013

We are creating a custom page where we are providing user a control to add summary links. This is a provider hosted app page and we can't use the SharePoint controls there. So, we are giving the users ...
0
votes
1answer
411 views

Cannot invoke HTTP DAV request. There is a pending query during OpenBinaryDirect

I've to move some items from one document library to an other one in a different site. I use object client model to do this My issue is having an exception while i'm trying to open the file and here ...
1
vote
2answers
54 views

CrossListQueryInfo or SPSiteDataQuery equivalent in REST API or CSOM

Is there any equivalent in SharePoint 2013 RESTful API or JavaScript Object Model to either one of the following? CrossListQueryInfo SPSiteDataQuery
1
vote
1answer
150 views

Sharepoint 2010 CSOM Get user and his groups by login name

I want to get a user and all his groups by a login name. Easy to do in Sharepoint 2013. clientContext.Load(site, l => l.RootWeb.SiteUsers, l => l.RootWeb.Id, l => l.Id); ...
0
votes
2answers
1k views

how to get list items fields using CSOM

I have to get other column value of list item whose "Title" matches with entered string in text box from the page. I am using CAML query to match "Title". But in Success function, how to get that ...
0
votes
1answer
30 views

updating list item of a file using CSOM

I am using following code to copy a file from a Document Library to another. The file is copied and is there, but the fields will not be updated. fileInfo = File.OpenBinaryDirect(srcClntCntxt, ...