sharepoint-clientobject

How to read a column type SPUser, DateTime, Currency with EcmaScript?

£可爱£侵袭症+ 提交于 2019-12-04 19:37:22
I have a list in SharePoint 2010 with some columns. All are default types. So I have "Single line of text" "Multiple line of text" "Date and Time" "Choice" "Number" "Currency" "Person or Group" My aim is to have a custom ribbon tab or group where I can perform some action on this list. As a starting point I created an Empty Element in my Visual Studio solution and put inside Elements.xml my buttons. This works so far. I also figured out how to do a postback to react on pressed button. This postback refers to a JavaScript file. Before performing some action I tried first to read the given

Optimal/preferred way to call 'SP.ClientContext.executeQueryAsync' in SharePoint

蓝咒 提交于 2019-12-04 09:25:12
问题 I have been learning client-side object model and came across the method executeQueryAsync. I found there are quite a few ways to call this method. Some of the one I found were these: var context = new SP.ClientContext.get_current(); // Option 1 context.executeQueryAsync( function(sender, args){ }, function(sender, args){ } ); // Option 2 context.executeQueryAsync( Function.createDelegate(this, _onSucceed), Function.createDelegate(this, _onFail) ); // Option 3 context.executeQueryAsync(

SP2010 Client Object Model 3 MB limit - updating maxReceivedMessageSize doesnt get applied

做~自己de王妃 提交于 2019-12-04 03:40:10
问题 I am using Client Object Model to interact with Sharepoint 2010. When I tried to upload documents greater than 3 MB using Client OM, it gave an error Bad Request. Microsoft suggests this to fix the problem. I tried that and updated the maxReceivedMessageSize property. It works fine after I restart the system, but doesnt get applied to a running sharepoint server. I assume that as the setting might have been kept in memory, so needs an application reset, but I cudnt figure out what to reset. I

Access denied office 365 / SharePoint online with Global Admin account

 ̄綄美尐妖づ 提交于 2019-12-03 16:58:24
I am going crazy since two days solving an issue. The problem is; I am making a console APP which is talking to SharePoint Online using global admin account (One which was specified as admin while making a new subscription). What I am trying to achieve is, I want to add a custom action using CSOM to each site collection and subsite of office 365. That code works fine except on the root site collection which is pre-created by office 365 while signing up (i.e. https://xyz.sharepoint.com ) For any tenant for root site collection, it gives me below error; { "SchemaVersion":"15.0.0.0",

Programmatically get ListItemVersion using client object model SharePoint 2010

牧云@^-^@ 提交于 2019-12-03 13:11:49
I have a scenario where I have to move all my data in a SharePoint 2010 list (name= "VersionTestList") to a SQL server database. Since versioning is enabled in the list, I want to move the previous version details too. Anyway I was able to move the latest item, but unfortunately I am not able to get the previous version data. I have tried this using Client Object Model and able to get the versions, but not able to get the ListItem of that corresponding version. Please find below the code which I have tried till now and give me a hand in resolving this. Also, I am taking the version of the

Sharepoint client object model: How to get all the fields in a list

别说谁变了你拦得住时间么 提交于 2019-12-03 10:16:36
问题 I have a list named "Discussions List". I want to bring all columns from the list. I want to know how to do it SharePoint Client Object Model. 回答1: OK. Found the solution. Answer Here using a list I'm getting by title, but will work with any method: // Get your ClientContext for your site in 'clientContext' SP.List oList = clientContext.Web.Lists.GetByTitle("List Title Here"); SP.FieldCollection fieldColl = oList.Fields; clientContext.Load(fieldColl); clientContext.ExecuteQuery(); foreach (SP

Optimal/preferred way to call 'SP.ClientContext.executeQueryAsync' in SharePoint

左心房为你撑大大i 提交于 2019-12-03 03:02:42
I have been learning client-side object model and came across the method executeQueryAsync . I found there are quite a few ways to call this method. Some of the one I found were these: var context = new SP.ClientContext.get_current(); // Option 1 context.executeQueryAsync( function(sender, args){ }, function(sender, args){ } ); // Option 2 context.executeQueryAsync( Function.createDelegate(this, _onSucceed), Function.createDelegate(this, _onFail) ); // Option 3 context.executeQueryAsync( Function.createDelegate(this, this._onSucceed), Function.createDelegate(this, this._onFail) ); // Option 4

Client object model get item by id error- “Item does not exist. It may have been deleted by another user”

江枫思渺然 提交于 2019-12-02 09:40:13
问题 I am getting error while I try execute get list item by id ClientContext clientContext = TokenHelper.GetClientContextWithAccessToken(sharepointUrl.ToString(), accessToken); Web web = clientContext.Web; clientContext.Load(web); clientContext.ExecuteQuery(); clientContext.Load(web.CurrentUser); clientContext.ExecuteQuery(); currentUser = clientContext.Web.CurrentUser.Title; List _list = web.Lists.GetById(_ListGuid); clientContext.Load(_list); clientContext.ExecuteQuery(); Microsoft.SharePoint

SP2010 Client Object Model 3 MB limit - updating maxReceivedMessageSize doesnt get applied

空扰寡人 提交于 2019-12-01 19:26:44
I am using Client Object Model to interact with Sharepoint 2010. When I tried to upload documents greater than 3 MB using Client OM, it gave an error Bad Request. Microsoft suggests this to fix the problem. I tried that and updated the maxReceivedMessageSize property. It works fine after I restart the system, but doesnt get applied to a running sharepoint server. I assume that as the setting might have been kept in memory, so needs an application reset, but I cudnt figure out what to reset. I have tried reseting different Sharepoint services. I have tried reseting Sharepoint website in IIS.

Sharepoint 2010 client object model with camlQuery - file download but no content / 0 byte

半城伤御伤魂 提交于 2019-12-01 06:47:24
I'm trying to download a txt file from a subfolder within a folder in a document library. I'm using camlQuery to achieve this. Unfortunately, i get no content of the txt file. It has 0 byte. public void SaveFolderFiles(string fileName, string libraryName, ClientOM.ClientContext clientContext) { ClientOM.List sharedDocumentsList = clientContext.Web.Lists.GetByTitle(libraryName); ClientOM.CamlQuery camlQuery = new ClientOM.CamlQuery(); camlQuery.FolderServerRelativeUrl = "/Site/Folder/Folder2010/"; camlQuery.ViewXml = @"<View> <Query> <Where> <Eq> <FieldRef Name='FileLeafRef'/> <Value Type='Text