Showing posts with label Client Object Model. Show all posts
Showing posts with label Client Object Model. Show all posts

Saturday, April 11, 2015

New SharePoint CSOM update for Office 365

Wow. This is such a great build. Loving the new additions added in the new SharePoint CSOM for Office 365. Since a year, was submitting the feedback and waiting for some features has to be included in the CSOM API and here they are. You can do even more with the new API methods and classed added. The package will be available via Nuget.

Version: 16.1.3912.1204.

The major feature I really impressed are:
  • Manage regional settings of a site
  • Manage language settings of a site
  • Manage auditing settings of a site
  • Support for upcoming enhanced migration APIs
  • Secondary contact in site collection level
  • Sharing settings
  • Tenant
The auditing settings API is a major help for me along with the Sharing settings. There are over 50 methods added across and the major ones which might help you are:
  • Accessing document set properties, documents
  • Added classes related to Search PushTenant
  • Additional properties for Publishing classes
  • Accessing AppCatalog
  • Audit information
  • File, Folder methods and properties
  • Many Web and Site properties and methods. 
If you are feeling like you are unable to implement just because of product limitation then it's for you. Go and have a look at the new update and start building the examples. 

Get more details about complete CSOM methods and properties here.

Saturday, May 1, 2010

Silverlight Client Object Model - Samples and Examples in SharePoint 2010

This is the post which belongs to the same series of the samples and examples of the Client Object Model in SharePoint 2010. So, this post I give you a start up examples for Silverlight Client OM.

Download the examples from here.
Download Silverlight Client OM examples and samples.

Let me know the feedback and if you need anything else.

Friday, April 23, 2010

SharePoint 2010 ECMAScript Client Object Model - Samples and Examples

I have done sufficient experiments on SharePoint 2010 Client Object Model and other features while I am learning SharePoint 2010. Now, my work is to share the knowledge I have gained. So, part of that is all these examples and samples. I hope they will help you to better understand and keep you up to date with new technologies.

As we know SharePoint 2010 provides the nice API for 3 client object models, in this post I have concentrated on ECMAScript client object model.

Download the code from here and start see the code and try to learn it. All these examples are my own development and not copied from any where in the internet.
Download ECMAScript Client Object Model Samples and Examples.

Before take a look at the code, you should read the article for where to place the code and how to use.
ECMAScript - Complete details

Tuesday, April 13, 2010

SharePoint 2010 Managed Client Object Model - Samples and Examples

After spent good amount of time on learning and experimenting on SharePoint 2010 client object model, I want give some examples and samples to my users. In that plan, here are some examples which helps you to understand and make better coding.

In this post I am concentrating on Managed Client Object Model and examples.
Please find the zip file here and download and start see coding and understand it. It has all the C# projects in a solution which are simple to understand and write.
Download Managed Client Object Model Samples and Examples.

All these examples are created by me to give some practice to learn SharePoint programming to my users. So, if you find it useful then please share and give your feedback. I am planning to write more and share more. Check for more in the upcoming posts.

Monday, March 8, 2010

SharePoint 2010 Silverlight Client Object Model - How to use

As part of the introduction series, I want to present the advantage of the client object model introduced in SharePoint 2010. There are great advantages with this model as it don't require SharePoint needs to be installed on the client machine. We just need to refer the client dlls which Microsoft SharePoint provides and based on them we will write code to communicate with SharePoint server. In this article we will go through Silverlight Client Object Model. If you want to know the other client object model types go here. ECMAScript and Managed client object models.

To communicate with the SharePoint server in Silverlight context we need to give two client SharePoint DLL references to the silver light project.

Friday, February 26, 2010

SharePoint 2010 ECMAScript - How to know logged in user information

This is post which is simple and not really needed. But when I started writing the code in ECMAScript I have faced problems in getting the logged in user information. So, my readers may feel good after see this post and really most the users are looking for this too.
By this time, we have really understood all about ECMAScript Client Object Model and debugging. So, it's easy for us to know it well.
Please find the code below to get the current user information.
<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(getWebUserData, "sp.js");
var context = null;
var web = null;
var currentUser = null;
    function getWebUserData() {
        context = new SP.ClientContext.get_current();
        web = context.get_web();
        currentUser = web.get_currentUser();
 currentUser.retrieve();
        context.load(web);
        context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod), Function.createDelegate(this, this.onFailureMethod));
    }
    function onSuccessMethod(sender, args) {
        var userObject = web.get_currentUser();
        alert('User name:' + userObject.get_title() + '\n Login Name:' + userObject.get_loginName());
    }
    function onFailureMethod(sender, args) {
        alert('request failed ' + args.get_message() + '\n' + args.get_stackTrace());
    }
</script>
So, the above code returns you the user object and displays user name and user login name. You can customize it as you want and please let me know the feedback or questions you have.

SharePoint 2010 ECMAScript - how to know all methods in SP object and debug

After spent good time to write nice posts on Client Object Model and ECMAScript how to use, I want to present you another nice tip on how we know all the methods and properties available for the SP object in the ECMA javascript . MSDN documentation is not finalized or completed yet to know what properties and methods  for SP objects have. And when you want to query something [like list or web] and you are not aware of what it has inside methods and properties, then the best way as far as I know is, using the Javascript debugging using Internet Explorer.

SharePoint 2010 - Client Object Model - ECMAScript - Introduction on how to use

In SharePoint 2010, the great feature is introducing the client object model [Read this article before proceed]. The great advantage with this is, we can do plenty of things without server side coding using the ECMAScript. There are plenty of default supported files to use and do whatever you want with the SP Package files. All javascript files will be found in the layouts folder. All of them starts with "SP" name.

ECMAScript works only for the current context. It means from outside of the site, you can't access the SharePoint data. This won't support the cross-site scripting.

How to add the reference to SP.js and access the data?

Thursday, February 25, 2010

SharePoint 2010 - Complete details about Client Object Model

This is the introduction to the Client Object model introduced in the SharePoint 2010. This is going to be a huge help and useful part in SharePoint 2010 for developers and makes lot of customization to the existing SharePoint system.

In eariler versions, I mean till SharePoint 2007 the code runs using the SharePoint object model to run against the server which is running SharePoint. Other than the SharePoint server object model, other way is, simply reference the web service and use that to get and manipulate data. Then what is the need of SharePoint 2010 Client object model[Cleint OM] concept?