Client Side Application for SharePoint 2010


Well Some time back, I got a request from the Client to use the data from SharePoint into Win Form application, well in order to do so i used already exposed WebService in order to interact with the SharePoint. But in one of the requirement i wrote some additional WebService.

So, Microsoft SharePoint Team takes the SharePoint to the next level, providing a managed code Client side object model to execute the request just as to execute  code on the Server.

SharePoint 2010 provides the two assemblies, Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll.

These assemblies provides the functionality from creating a site to update a List Item in the List.

Considering that Client Side application will contribute into the Network traffic when corresponding to the Server. So rather than making a call to Server on each Step, the request can be bundle up and send in one go, so that it ease out the Network Traffic.

As it can been from the above diagram, a xml request send to the server and server send JSON in response, it is totally upto you when you want to make a call to server and get the response

The Client side object model extends the same legacy for creating a Context from the Server Object Model. Hence you can retrieve the site reference from the this Context.

For demo, i have created Winform Applicaiton which shows the all the List and its Item  in the given site.

As it can be noticed from the below application i have placed a TextBox for submitting Site URL, a button to retrieve the List collection into the ListBox Control and DataGridView to display the Item Field Title


Open Visual Studio 2010,

Create a Winform Application,

First Copy and paste  Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll from %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI to some common location like in bin directory of the project. than Add  these dlls as reference.

using Microsoft.SharePoint.Client;
include  above

above is the code for button click to submit the Site URL, as it can be noticed that it correspond to the Server, only when it execute the ClientContext.ExecuteQuery();

ClientContext.Load() only register the objects, it is up to the Solution architect to decide how often to  execute the ExecuteQuery Method. Another interesting aspect to notice that when providing the Site URL to context, the Client Object Model wont call the server, rather than wait for Execute Query method to run.

thanks for reading,

your comments and feedback is required,

Happy SharePointing 🙂


Visio 2010 for SharePoint Workflow Part 2

Hi ,

This is my sequel post from the,

As the user handed over the .vmi file to SharePoint Developer or Power User ( Mr X :))

Mr X opens the Microsoft Office SharePoint Designer 2010, choose the option Import Visio Workflow

Now SharePoint Designer will show the Dialogue Box to Browse for the  .vmi File,

clicking on next get to Mr X choose the List to attach with this workflow, in this case it will be attached with Shared Document.

once clicked finish, SharePoint Designer 2010 creates a following workflow in editable mode.

As you can see from the above picture, Mr X has to make some changes like to mention the file size range, and to choose the Field title to update the Text

Before Publishing this workflow to  the SharePoint site a Mr x select the following option in order to start this workflow automatically when the document is uploaded.

With all set to publish, Mr X  clicks on the Publish option present in the Ribbon.

Now Mr X wants to see how this workflow actually work, he goes to desired Document Library. Upload a document

as you can see, Mr X choose the document which has size more than 1 MB.

Now here it is Mr X, User are very happy to see that the workflow actually works the way they want,

Enjoy SharePointing 🙂

Visio 2010 for SharePoint Workflow Part 1

Hi again :),

We all have been asked by so many Clients, User, Managers etc, the same question.  what is Workflow? how it works in SharePoint. To brief a general User about a workflow, i usually share a power point presentation.

But in order to visualize a workflow,  a user need a tool to brief the SharePoint Developers or a Power User how they want to automate the process. Some time user give you a flowchart or Microsoft Document that describe about the process. But the flowchart or a document that is submitted not fit to the actual SharePoint notations or Actions.

Now with Visio 2010, the User can actually submit the Detail Diagram of Workflow exactly as the notations or actions of SharePoint Workflow understand.


The user wants to get the Share Document field Title updated as (Greater than 1 MB) when the document size will be above 1 MB or below  as (Less than 1 MB).

Now User who is familiar with Microsoft Visio, opens the Visio 2010, select the Microsoft SharePoint Workflow template, User can notice SharePoint Workflow activity grouped together as  SharePoint Workflow Action,SharePoint Workflow Conditions and SharePoint Workflow Terminators.

By dragging and dropping different activities from the panel, user formulate a Visio Diagram

now the user can check the Digram validity, by clicking  on the Check Diagram in the process tab of Visio ribbon options.

now you can export your diagram into a Visio Workflow Interchangeable format(.vmi) so that it can be handed over to SharePoint Developer or a power user so that it can be implemented in SharePoint Designer.

in my next blog i will elaborate how this .vmi file import into the SharePoint Designer and publish onto the SharePoint 2010.

A kick start concept for SharePoint 2010

Hi again, two blog in one day awesome,

For the mates who are working on MOSS 2007, want to have some nice idea is whats between in SharePoint Foundation 2010 and SharePoint 2010.

Well it is quite simple. the Window SharePoint Services 3.0 is now SharePoint Foundation 2010,

and the Microsoft Office SharePoint Server 2007 is now SharePoint 2010 . Isn’t it a simple.

by the way the above picture is not developed by me, i have taken it from here,

as you can see the architecture more or less have set of layer, now we can have a development environment on the Client machine, an up gradation with Server OS now it is Window Server 2008, IIS 6.0 to IIS 7.0, Asp.Net 3.0 or 3.5 to 3.5 SP1.

InfoPath 2010 for SharePoint 2010 List Form


Again i have been off for few days from my blog, now i am here writing about a coolest feature of InfoPath 2010 for SharePoint 2010. That is creating SharePoint List Form. In Simple word to modify the new item form on the List.

So the ingridents are,

1. InfoPath 2010

2. SharePoint 2010 running somewhere on your domain.

and the Recipe is

Create a List named as Today Sale, I want some changes in its item creation form,

now open InfoPath 2010, Select SharePoint List in the Popular Form Templates

next in the Data Connection Wizard, provide the path of site in my case it is http://sp2010/, in the next step choose Today Sale in the Customize an existing SharePoint List

click finish to end this wizard.

Form open in the below  format .

now we have to bind the Current User Username with the title, so first you have to make a Data Connection which fetch the details of current user.

In the Infopath Ribbon select Data, choose Data connection, click on Add

Click on the Receive data as done  in the above .

Select SOAP Web Service as done in the above click next, in the next step, provide the path SOAP Web Service of UserProfile, it resides at  http://ServerName/_vti_bin/UserProfileService.asmx. Then Click Next.

Choose the operation GetUserProfileByName as it is done in the above picture.  Click Next on following screen as well and then click finish to end this wizard.

Now then,  it is time to add the essential ingredient, bind the field with the current user info.

Right click on the Title field, go in to the text box property, click on fx as in the below picture

Click on the insert Field or group

Click on advance view in the Select a Field or Group.  Now in the Fields drop down select GetUserProfileByName. expand the below tree and select value as it is done in the below picture,

click on the Filter Datat after selecting Value.

now Click add to add a filter. In order to specify the filter condition, choose the Select Field or Group

Choose Name under the Property Data, as it is done below

and then click OK.

now back on the Specify Filter Condition dialogue Box, Expand  the third drop down list  and Select Type Text. This Drop down now act as Text Field, now a very important note here your have to provide the require profile property in my i want username so  enter UserName (Case Sensitive ) in the Text Field. Now Click Ok 5 times to close all the boxes 🙂

now we are back on the form, let’s do some garnishing on this form 😀

Delete the 2nd row of attachment as i dont want this, now you can preview the form.

I guess now it looks fine to me, so publish it right away.  Now go onto your Today Sale list  in your SharePoint site and click on the

add new item. you will get the following screen.

To end it on a learning note, below are the profile properties,


have a nice week-end, and happy coding and Sharepointing 😀