Questions tagged [client-object-model]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
988 views

Forms Authentication in Sharepoint 2013, _vti_bin/authentication.asmx error

I'm getting this error when using CSOM in a FBA web application that is configured agains't a custom FBA provider. I'm getting this error when site is configured for Forms, if a disable forms with ...
0
votes
1answer
894 views

Use content from Microsoft.SharePoint.Client.File

I have a Microsoft.SharePoint.Client.File called "Algemeen.aspx" that i got from SharePoint 2010. Now i need to get the content from that file in my vb.net application. Does anyone know how this is ...
1
vote
2answers
1k views

SP.UI.ModalDialog Namespace or Reference

Is there any server side reference for SP.UI.ModalDialog? What is the reference for SP.UI.ModalDialog for client side? How i reference this in webpart?
1
vote
1answer
2k views

Looking to retrieve user's groups in SharePoint

I am running SharePoint Foundation 2010. I have a claims based site setup to use a trusted token provider. I am passing it a set of claims that determine the user's group. They look similar to this: ...
0
votes
1answer
980 views

How to get ID field in form through internal name in SharePoint

I'm learning Sharepoint 2013 . I have a new form to add data . In that form i have a web part add javascript . In that script i want add code custom this form and i want get ID through internal name ...
0
votes
1answer
974 views

The property or field has not been initialized. Error throw in sharepoint online?

I have big problem. I tried a lot of solution for this issue but not worked. I need help. Here is my code. I try to get items from picture library. It's an app for sharepoint online. var context; var ...
7
votes
2answers
4k views

How to change 'Modified By' column value when a new file is uploaded in SharePoint 2013 using Client Object Model?

I want to change 'Modified By' column value of a file that is being uploaded using Client Object Model in SharePoint 2013. The problem is that the version of the file is changing. Kindly help me. The ...
1
vote
1answer
876 views

current user is always is administrator on a SharePoint App

I have tried following solution to check the current user's permissions on the current host web in a SharePoint hosted app, however the user is always administrator. function sharePointReady() { ...
0
votes
1answer
915 views

Reset sharepoint lookup with None option using jquery

How to reset the lookup value to None in Editform.aspx page using Jquery. I want to empty the lookup dropdown if text box does not have any value . Here is the code which i have tried.I was able to ...
1
vote
2answers
906 views

Client Object Model RoleDefinitionBindingCollection.Remove not working

I'm using the Client Object Model and trying to remove a specific RoleDefinition from a RoleDefinitionBindingCollection in a RoleAssignment. This is the code I'm using: Web web = context.Web;...
0
votes
1answer
1k views

User or group column is populated with incorrect values when adding data from CSOM

I am working on a console application that updates list items using managed CSOM. I have a user or group column in this list that can contain multiple values. Now, I am using below code to update the ...
1
vote
2answers
703 views

SharePoint Online: Get Document Library Children Count Using CSOM

My requirement is to get the children item count of Document Library using CSOM. The count should only be the immediate children count, and should not include the sub-children count. I am trying to ...
0
votes
0answers
19 views

How to update content in a file?

SharePoint 2010 Microsoft.SharePoint.client.dll I need to be able update a text file (basically adding a line at the end of the text file with log details) that is in a document library. Is it ...
3
votes
2answers
871 views

Get object of ribbon button in JavaScript

I am trying to access the ribbon button via JavaScript. Below is my code: // Get the page manager var ribbonPageMgr = SP.Ribbon.PageManager.get_instance(); // Get the ribbon var ribbon = ...
0
votes
1answer
988 views

Error Unable to get property 'getEnumerator' of undefined or null reference

Getting the following error when running my script: Unable to get property 'getEnumerator' of undefined or null reference My code : NBSFeedbackEditInbox.FeedbackRemove = (function () { var ...
2
votes
1answer
939 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 ...
0
votes
1answer
1k views

Check In file with Javascript and REST

I am trying to check in a file from my sharepoint-hosted app with jsom and rest, but it wont work my code look like this: function checkInFile() { var hostUrl = decodeURIComponent(...
2
votes
1answer
1k views

SharePoint 2010 Javascript JSOM creating a List View Web Part using javascript

I was able to follow along and add a Content Editor web part to a page using javascript from MSDN here. I am now interested in trying to find a way to add a List View or Data View web part to a page ...
2
votes
3answers
5k views

Is it possible to refer to a field hidden in current view from JSLink attached to current view?

I have the following JavaScript code attached to List's JSLink property: (function () { var coloringFieldContext = {}; coloringFieldContext.Templates = {}; coloringFieldContext....
1
vote
2answers
345 views

To connect to SharePoint Online Client Context using browser credentials from powershell

I am using below code to connect to SPO from powershell, but we have multi factor authentication in SharePoint. So I want to give credentials from browser instead of script. Please suggest as i ...
1
vote
2answers
1k views

Is there any way to overcome URL length limitation in REST API “GET” Requests?

Is there any way to overcome the 2083 characters limit using REST API GET request itself.
1
vote
1answer
1k views

CSOM Iterate all SiteCollection in an SPO Tenant

I am trying to iterate over all site collections in a SharePoint Online Tenant. I found this code on the web and adapted it to my needs: context = SharePointContextProvider.Current....
0
votes
0answers
14 views

Accessing SP List using Rest-APi

var url = serverRelativeUrl + "MyServer/_api/web/lists/GetByTitle('Test')/items"; var httpRequest = $http({ method: 'GET', url: url, crossDomain: true, ...
2
votes
3answers
2k views

Stop workflow associated to a list via JSOM

I want to stop a workflow when user clicks on the Cancel request button. To achieve this I am trying with the JSOM code. My code as follows SP.SOD.executeOrDelayUntilScriptLoaded(function(){ SP....
2
votes
1answer
1k views

Does audiences work with CSOM?

If we build an SharePoint app and need to show items based on audience targeting, can we use CSOM for that? Can't find any references to it in the CSOM SDK.
0
votes
2answers
1k views

How to handle list item events from client side using JSOM?

My requirement is like - When an item is added to a list, a log should be added to another list? And this needs be done using JSOM. is there a way to achieve this using JSOM?
3
votes
1answer
3k views

Sharepoint client object model {File not found}

var onlineCredentials = new SharePointOnlineCredentials(ServiceUserName,securePassword); var context = new ClientContext(clientUrl); context.Credentials = onlineCredentials; ar cc = GetAllFiles(...
5
votes
1answer
1k 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 ...
3
votes
1answer
1k views

502 DNS lookup failed error when using SharePoint 2013 CSOM

I am facing an issue while using CSOM in SharePoint 2013. I have configured an alternate access mapping for our site to run on http://mycustomdoamin.net/ The site is running fine and I am able to see ...
3
votes
1answer
2k views

CSOM The request uses too many resources error while provisioning web

I am provisioning web on SharePoint online using following CSOM code(provided hosted app), but intermediately we are getting "The request uses too many resources" error. using (ClientContext ...
0
votes
2answers
683 views

Get additional column values from selected item in list view using Javascript\JQuery

I'm currently using JS (items[i].id;) to successfully get the id of selected items in a list view, however, I would like to pull column values from the selected row(s) like "Title" etc. if possible ...
0
votes
1answer
2k views

Update editor of published version without affecting version number - CSOM

I am trying to copy files from one site collection to another including their version history and preserve the metadata using CSOM. I am almost there using the below logic for each version of the file....
4
votes
2answers
7k views

Specify item fields to Load using SharePoint 2010 Client OM

How can I dynamically generate/specify a list of item fields I want to load when querying a list using the Client OM? This is possible to do using the tag on the CAML query, but this loads additional ...
1
vote
0answers
34 views

Retrieve share links via CSOM

I currently have a program that will upload selected files to specific folder on SharePoint and give access to specific users based on their emails using the SharePoint CSOM API, however I am unable ...
6
votes
2answers
3k views

set multiselect lookup column using jquery

I have a Multi select Look up column which as you all know is a control with two list boxes and "Add or Remove" Buttons. The user populates the right-hand side of the control with some values by ...
3
votes
4answers
10k views

Create list from custom template using csom, c#

I would like to create a list based on a template (.stp uploaded to the list template gallery), it almost works with this code: ClientContext context = new ClientContext("<Your Site URL>"); ...
3
votes
1answer
3k 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 ...
0
votes
1answer
616 views

How to edit SharePoint page content/URL using client Object Model

I have SharePoint Site on SharePoint online with Pages library having 5 pages with content. Need to modify the URL in the pages programmatically using Client Object Model suppose I have Newname.aspx ...
1
vote
1answer
36 views

Access Root Site List from Sub site using Remote Event Receiver in SharePoint Online

I am trying to access the Root site list using the sub site client context. But when I try to execute the clientcontext it gives Access Denied error. I tried to create new clientcontext by passing ...
1
vote
1answer
175 views

Execute CSOM code from .net core

Is there any option to execute CSOM code from .net core application? I have a bot solution from this i need to store all the conversation details in SharePoint list. When executing the code, i am ...
0
votes
2answers
644 views

Synchronize excel file with SharePoint online list

I want to synchronize data from excel file with SharePoint list on office 365. I have already built a utility which uses client object model to achieve this but it is very slow as item count are in ...
0
votes
1answer
37 views

Update a list item using Client side object module code and prevent sharepoint list workflow 2013 from been executed

I have a custom list inside our sharepoint online classic team site collection. and i define a workflow 2013 on the custom list. where the workflow will be executed when creating and editing the list ...
1
vote
1answer
799 views

How to get url of file after uploading to document library?

How do you return the URL of a file after it has been uploaded to a document library, using the default upload page? Returning the text from the "inputFile" textbox from the upload.aspx page would ...
0
votes
1answer
658 views

Getting Filtered results by Date column from a list with BCS and SharePoint 2010 JavaScript Client Object Model

I'm trying to get the filtered results by a column type DateTime from a list filled with BCS using JavaScript. I've tried everything to get those results with query like: "<Where>" + "<...
4
votes
1answer
9k views

Check- in & check-out files using client object model

As the title says, how can I Check- in & check-out files using client object model?
1
vote
1answer
682 views

List does not exist when trying to startworkflowonlistitem from CSOM

Using SharePoint 2013 on Windows Server 2012 Standard. I believe this is an issue with permissions. When trying to start a workflow on a staging server, the following exception happens (as shown in ...
1
vote
2answers
737 views

Create external users using CSOM

Does anyone know if it's possible to invite external users with the client object model or is this only possible in the UI?
0
votes
1answer
756 views

Creating list item from outlook mail

I have a requirement where I have to update list item in a list fetching values from an e-mail. I have to create a button in the outlook ribbon, clicking on which the values (in key-value pair) should ...
1
vote
1answer
700 views

Get list at site collection level using SP.js

I have this code which is meant to get data from a list at the site collection level. var clientContext = new SP.ClientContext.get_current(); var oList = clientContext.get_site().openWeb()....
0
votes
1answer
769 views

REST addViewField “Cannot handle the data at position 0.”

I'm currently writing an initialisation script for a SharePoint-hosted application which checks if a list (used for launcher items) exists. If it doesn't, then it runs through a series of processes to ...