Tag Info

Hot answers tagged

4

You are missing the <View> tags in your ViewXml (see example here) It should be string qs = String.Format("<View><Query><Where><Eq><FieldRef Name=\"Title\"></FieldRef><Value Type=\"Text\">{0}</Value></Eq></Where></Query></View>", listItemTitle); query.ViewXml = qs; In case of ...


3

I know in the JavaScript Client Object Model executeQueryAsync is performed using an XmlHttpRequest, the results of which are cached by default. I would assume the managed client object model requests data using the same method 'under the covers' As for how long the cached request is valid, it appears to be dependent upon the user's browser configuration. ...


3

It basically depends on your personal experience with the different technologies, there are many opinions out there with lots of pros and cons that may or may not be relevant to you. I personally very much dislike pure javascript CSOM because of all the context loading and SPServices was a good abstraction for that, but eversince I've used REST in SP2013 I ...


2

The Microsoft.SharePoint.Client.Phone.Runtime.dll contains the ClientRuntimeContext class, which Represents the runtime context for accessing data from remote objects, and invoking methods on remote objects. There is a great write-up here. Essentially: When working with the managed client object model we start with creating a ClientContext class (in ...


2

Pros A wide range of SharePoint functionality is exposed with the SOAP Web Services, much of which is not available in CSOM Allows anonymous access (assuming it is enabled for the underlying objects) Works cross-site and cross-domain, assuming that the authentication model you are using allows it Simpler syntax than the CSOM. Simply pass the required ...


2

It looks like Microsoft have introduced the SiteLogoUrl property now within SPWeb in Office 365: http://blogs.office.com/2014/08/13/uservoice-driving-improvements-sharepoint-api/ and https://officespdev.uservoice.com/forums/224641-general/suggestions/6234945-make-the-sitelogourl-property-available-in-csom The <SiteLogoUrl> element is emitted from the ...


2

you can use SP.UI.ModalDialog.showWaitScreenWithNoClose If you want to use the 'Waiting' dialog function OpenDialog(targetUrl) { var waitScreen = SP.UI.ModalDialog.showWaitScreenWithNoClose("Loading", "Please wait"); var options = SP.UI.$create_DialogOptions(); options.url = targetUrl; options.autoSize = true; ...


2

According to SharePoint 2013 Online App: 403 Response While Downloading Documents from a Document Library article this error occurs when using oAuth App authentication model since Microsoft.SharePoint.Client.File.OpenBinaryDirect method doesn't pass App token The solution is to use Microsoft.SharePoint.Client.File.OpenBinaryStream method instead as ...


1

First of all, SP.List.getItems Method returns SP.ListItemCollection object not an SP.ListItem object. Second, in your case you have to submit first query in order to retrieve item collection and then only to get the item and delete it, for example: var items = list.getItems(query); context.load(items); context.executeQueryAsync( function() { ...


1

You are attempting to use a SP.ListItem method on a SP.ListItemCollection object. SP.List.getItems() returns a SP.ListItemCollection object. You must iterate through this to get to the items themselves. Try the following: function deleteListItemSP(title){ var siteUrl = 'mylink'; var clientContext = new SP.ClientContext(siteUrl); var oList = ...


1

You need to authenticate with your SPO credentials: var creds = new SharePointOnlineCredentials("user@tenant.onmicrosoft.com", password); // Requires SecureString() for password context.Credentials = creds; It needs to be done prior to your first context.ExecuteQuery(). Here is info on the SharePointOnlineCredentials class.


1

So I know this is old, but Community decided we should look at it today... You can enumerate the subwebs and put all the urls as keys in an object, then check if the url was put into the object or not... var myCtx = SP.ClientContext.get_current(); var mySubWebs = myCtx.get_web().getSubwebsForCurrentUser(); myCtx.load(mySubWebs); ...


1

As Andrey pointed out there is no SPList.GetItemByUniqueId Method alternative in CSOM API. You could utilize the following extension method to load the list item by GUID in CSOM: static class ListExtensions { /// <summary> /// Load List Item by Guid /// </summary> /// <param name="list"></param> /// <param ...


1

This error occurs since you are using SharePoint Server 2013 Client Components SDK (ver. 15) or SharePoint Online Client Components SDK (ver. 16) but against SharePoint 2010. Microsoft.SharePoint.Client.Web Url Property was introduced in CSOM ver. 15 How to determine Web Url in SharePoint 2010 The following example demonstrates how to get sub webs url in ...


1

Even though Web class does not expose Groups property like SPWeb class does, you could still retrieve a collection that contains all the groups for the website. How to retrieve groups for a web Use RoleAssignmentCollection.Groups property to get the groups that directly belong to the access control list (ACL). for this securable object. CSOM using (var ...


1

The my idea is get library with ComboBox(controls), with this you can choose where you want save... Example of use: UploadFile("http://mysite.com", combobox.Text, "", "imgscanned.jpg", bmp); Add 2 References in your project: 1.Microsoft.SharePoint.Client.dll 2.Microsoft.SharePoint.Client.Runtime.dll In the code of the your Project: using ...


1

Referring directly the AssetPortalBrowser.aspx and getting the URL will be very much difficult, rather create an object and open the popup will be easier. Follow the below steps. I am getting the selected selected file in a text box and showing it in a alert. Go to Site Content > Site Assets Create a folder name Scripts Upload jquery-1.11.1.min.js and ...



Only top voted, non community-wiki answers of a minimum length are eligible