Questions tagged [sharepoint-clientobject]

API to interact with SharePoint data remotely from script that executes in the browser

Source: Client object model resource center | SharePoint 2010: The new .NET managed, Silverlight, and ECMAScript (JavaScript, JScript) client object models in SharePoint Foundation provide powerful ways to interact with SharePoint data remotely from script that executes in the browser, from Silverlight applications, or from .NET client applications. These APIs include a subset of the features available in the server object model, providing access to objects at the site-collection level and lower within the SharePoint hierarchy.


SharePoint 2013 client APIs provides SharePoint client object model to retrieve, update, and manage data in SharePoint 2013. SharePoint makes the object model available in several forms:

  • .NET Framework redistributable assemblies
  • JavaScript library
  • REST/OData endpoints
  • Windows Phone assemblies
  • Silverlight redistributable assemblies

synonyms: client-object-model

281 questions
0
votes
1 answer

CSOM Caml Query Not able to find file - SharePoint 2010

I am try to get the following file "GC_SELF_TEST.ppt" document from the following folder When I run my code, it does not return any results. I'm quiet certain the problem is in my CamlQuery (I'm new to CSOM and CamlQuery). I would just like to get…
Rana
  • 1,675
  • 3
  • 25
  • 51
0
votes
1 answer

Deleting Sharepoint list items from one site to another programmatically

I'm trying to delete items from the myDestinationList if they do not exist in the mySourceList. I'm trying to get this method done in C#. I have it set up this way because the two list are on different servers. Any suggestions? Also would I be able…
Shark Tank
  • 25
  • 5
0
votes
2 answers

executeQueryAsync synchronously in each loop for sharepoint javascript model

I am performing looping in javascript for sharepoint. I want it to perform synchronously, means only after first data execution is done it should start with second. If first data execution is completed (whether it success or fail) then only it…
Mahesh
  • 730
  • 7
  • 26
0
votes
1 answer

SharePoint Lookup ListItem not loading value

I am importing a database into SharePoint Lists. I have a list of Plants that are owned by Companies. Plants have columns for "Plant Name", "Company", "State", "Address", and so on. "Plant Name" and "Address" are both single text lines but "Company"…
hengj
  • 87
  • 1
  • 1
  • 10
0
votes
1 answer

How to get the uppest root sitecollection in SharePoint JavaScript

my structure in SharePoint 2013 is something like this: RootSiteCollection RootWebSite ListA SubSiteCollection SubWebSite Page And now I need to create an item in the 'ListA' What I tried: function Report(Data) { var Context = new…
0
votes
1 answer

Cannot load value of "multiple line of text" using COM in javascript

The column name is "Dialog Box". I tried this var context = new SP.ClientContext.get_current(); var targetList = context.get_web().get_lists().getByTitle("myList"); var targetListItem =…
user4624062
0
votes
1 answer

Sharepoint 2013 Client Object Model Console Application the-remote-server-returned-an-error-403-forbidden-error

I have SharePoint 2013 WebApp with Claim Based Authentication. This WebApp also has trusted identity provided enabled at it. Now I am trying to connect to one of the site collection from the Console application with below code. using (var…
0
votes
1 answer

Which method can grant Read access

I am having trouble to use C# program directly grant read permissions to the users using Client Object Model, so my current approach is to create a role that can have read access, then I am going to add my users to this role I created. The code I…
OPK
  • 4,120
  • 6
  • 36
  • 66
0
votes
1 answer

Permission denied Sharepoint

Can you guys help me ? I want to check if user is in group,but i could not get users from group. If current user is not in group, i get error "Access denied". If current user is in group everything is ok. function checkGroup(){ var…
0
votes
1 answer

Read All users related to RoleDefinition of ProjectSite using CSOM

I need to loop through all RoleDefinitiona of ProjectSite and get all users related to each one and add those users to a RoleDefinition of a ProjectSite in another SiteCollection I can loop through RoleDefinitions like : using (var src_ctx = new…
0
votes
3 answers

Get all sharepoint sites in a site collection to which user has access using Javascript client object model

I want to display all sites in a site collection using JSOM to which user has access to. In other words I only need to find collection of sites to which user has access in a site collection. I am able to get all webs but it doesnt work if user…
Learner
  • 79
  • 2
  • 11
0
votes
1 answer

Not able find user in userinformation list

I am using one list and it has one person field configured for "All Users". So when i type some email ID in that person field, it is getting user and it works well. But when i wants to add new record through client object model, some users are not…
Sathish
  • 159
  • 1
  • 4
  • 18
0
votes
0 answers

Delete a list using SharePoint 2010 CSOM

I am trying to delete a list that contains documents using the SharePoint 2010 CSOM and am using the following code: var list = context.Web.Lists.GetByTitle("Project Documents"); list.DeleteObject(); context.ExecuteQuery(); But I always get the…
awh112
  • 1,466
  • 4
  • 22
  • 34
0
votes
1 answer

Sharepoint 2010 and webservices sync

I have a List with Webservice URL,username and password. I have created a custom tab and ribbon tab. The webservice URL return a large xml file as output. Now when the list item with the URL is selected and ribbon button is clicked i want to process…
0
votes
1 answer

How to add items to sharepoint list from a html document?

I am trying to create a comments section in a sharepoint site. Is there anyway I can use javascript to read some text from a 'div' or a 'p' element and then add that item into a list when the user press submits? Some examples of codes would be much…
k3060
  • 47
  • 1
  • 1
  • 8