Wednesday, June 27, 2012

Creating Meeting Workspace in SharePoint 2010 from outlook 2010


With Outlook 2010, we can create meeting workspace inside SharePoint 2010 or Windows Foundation Server 2010.

In this post, I am going to show you how we can create this workspace.

First open outlook 2010 and click on create meeting.



Type the address of person, time of meeting, subject, location and a body of meeting.



From top menu, click on arrow and then click on more commands.



Find meeting workspace and add it to right and click on ok.



Then you will find an icon appeared on top bar.



Click on that icon and you will see meeting workspace task pane on right side.
Now click on change settings.



Select other from the drop down and it will ask you for a URL.



Type the URL of the parent site under which you would like to create a meeting workspace.



Click on ok twice and then click on create.

The best part is it will create the meeting workspace behind the scene and get the URL of the newly created meeting workspace right there in your outlook message with nice highlited box.



Same steps you can perform in MOSS 2007 and Outlook 2007. I hope this will help.

Friday, June 22, 2012

Generating Custom Document ID in SharePoint 2010


Earlier we saw what Document ID is. If you have not read the post about Document ID in SharePoint 2010, I would strongly recommend you reading it first before reading this post.

Once you have fair understanding on document ID, this is the next step on generating your own document ID in SharePoint 2010.

First question that comes into mind is why would we need to generate custom document ID? 

Well, the answer is simple. If you have any specific requirement to generate ID based on some department, some functions inside your organization which helps you to search for document easily plus taking an advantage of document ID feature so that even if the document is moved anywhere across the site collection, you can use the same URL that is generated for document.

First thing to note is that we need to use Microsoft.Office.DocumentManagement namespace which has a class called DocumentIdProvider.

In this class we need to override three methods and one property.

1)    GenerateDocumentId  - Method – This is the method where we will actually generate our own document ID

2)    GetDocumentUrlsById  -Method – This returns an array of URLs which points to this document.

3)    GetSampleDocumentIdText  - Method – Default Document ID value that will be shown in the search web part as a part of help.

4)    DoCustomSearchBeforeDefraultSearch – Property – If set to true, then it will call the GetDocumentURLsById method before search or if set to false, then it uses SharePoint search before custom methods.

Now let’s go ahead and create a class that inherits from DocumentIDProvider and writes these methods.

Go ahead and create a project and add a reference to DocumentManagement namespace.


And here is the entire code of the class



Note: Replace Name with Title property of web to get the title of web.

We have written code in respective methods based on the summary that we have noted earlier for each method and property above.

Now we are done with one part. Next, we need to register this custom document id with the site collection via feature. So go ahead and create a feature scoped at site collection level.



Now go ahead and add the event receivers for this feature.

Remember we would be applying our custom document ID generator when we activate this feature and when we de activate this feature we want SharePoint to use default generator back again.

So we are going to write code only in two methods activated and deactivating.



Before deploying change the property on activate feature default to false by going to the properties settings of the feature.



Now build the project and deploy the package.

Open the site and go to the site collection feature. Make sure that Document ID service feature is turned on.



Also activates the feature that we have deployed.



Now go to Document ID settings under site collection administration options.



And you will notice that it says custom document id provider has been configured for this site collection.



And there you go once you upload documents, you get new DocumentID generated by your custom code.



When you turn the feature off, it sets back to default Document ID provider.  

Wednesday, June 20, 2012

The result is out

Finally the result is out and here it is


Monday, June 18, 2012

Why is SSP removed from SharePoint 2010


SSP is shared service provider and that was available in MOSS 2007. In MOSS days, there were certain actions that can only be performed only if you have created the SSP like the BDC and User profiles.

Now we all must be thinking that why SSP is removed from SharePoint 2010 version? Well there are many aspects to this.

First assume that you are going to have different web application and you would only need to work with BDC and do not want to use any other service that comes under BDC, but still just to use one BDC service you need to create two SSP that means two separate databases.

Another thing is in SSP we did not have items which are in similar nature. They all performed different operations.

It is little difficult to deploy the SSP on servers.

Because there are too many services in one database, so it becomes difficult to scale it. It did not support scaling as we could not add any extra service to the SSP.

Now in SharePoint 2010 SSP has been replaced by Service Applications. These services are not groups under anything, they all run independently. In other sense, service applications provide a-la-carte options to choose from. Per web application, you can configure which service you want to consume.

You can also publish these services outside of the current farm so that these services can also be used elsewhere. You need trust relationship between those farms who wants to consume these services.

You can also write your own services and add that service to this service application.
Here service applications have their own databases unlike shared database in MOSS 2007 SSP.

You can use PowerShell commands to play around with these services.

Get-SPServiceApplication returns all  service applications.
Get-SPServiceApplication-name {servicename} to get the service object.

From there you can get all other properties related to the service.

Bottom line is SSP services are now split into individual services and can be consumed from web applications as and when needed. These services are:
  • Profiles, Audiences = People Service App
  • Search = Search Service App
  • Performance Point = Performance Point Service App
  • Excel = Excel Service App
  • Office Web Applications = Office Web App
  • Visio Services = Visio Service App
  • Word = Word Service App
  • PowerPoint =  PowerPoint Service App
  • Project Server = Project Server App
Here are some new services that have been introduced in the SharePoint 2010.
  • Access Services - Allows viewing, editing and accessing Access databases in a browser.
  • Managed Metadata Service - allows access to managed taxonomy hierarchies, keywords, and social tags for site collections.
  • Secure Store Service –Provides capability to store data (e.g. credential set) securely and associate it to a specific identity or group of identities.
  • State Service - Provides temporary storage of user session data for Office SharePoint Server components.
  • Visio Graphics Service – Helps to view Visio diagrams in a web browser.
  • Word Conversion Service Application – Allows converting documents into different formats.
I hope this will give you a basic idea as to what is it that has replaced SSP and why?

Wednesday, June 13, 2012

Understanding Data Form Web Part in SharePoint 2010/ MOSS 2007 – Part 3


If you have not gone through Part -1 and Part -2 of this series, I would recommend you reading it first and then continue reading from here.

Let’s go ahead and add form actions to data form web part.

Open the page that we had left opened in our previous post also open the list in browser. We are going to add email field to the list. I have entered some dummy email addresses to the list items.



Open SharePoint Designer page and add email field to the data form web part.



Now keeping cursor in email field, right click and then select insert column to right.



Now keeping cursor in that column, go to insert tab and select SharePoint controls, form action control button.



The moment you select the button, it asks you what you want to perform when button is clicked. We are going to select custom action.


So what happens is it generates a workflow that is not associated with the list, nor associated with site or not even with list item. It is independent workflow that can be triggered by the button.

It generates a workflow named form actions workflow 1.

Locate the property of button and change the text of button to send email. 

Now we need to make one more change because we are going to send an email to Email field mentioned in that specific list item, hence we first need to convert that field into a label so that we can make the reference of that field in the workflow.

So select the email field, right click that field and select format item as a label and then save the field.



Now locate the Form actions workflow 1 under workflows tab and open it to modify.



Select action - send an email.



And select these users for email and then select workflow lookup for user



Once you are done with this and if you have email server properly set up, then you should be able to send an email by clicking on that button which will send email to Email field mentioned in that list item.



Monday, June 11, 2012

Understanding Data Form Web Part in SharePoint 2010/ MOSS 2007 – Part 2


If you have not gone through part -1 of this series, I would recommend you reading it first and then continue reading from here.

If you open a page which we designed in previous part in browser and edit the page and then edit the web part, you will see XSL editor and parameters editor.


If you observe closely parameter binding, you will also find our color parameter set there. This way you can also enter multiple parameters binding here as well.



Now let’s get back to designer and select the data form web part. We are going to apply conditional formatting now.

Click on Table tab, then select and then row. This will select the row in data form web part.



Keeping the row selected, select options again and then conditional formatting and then formate row.



Select if color equals to red, and then click set style



Set background to red



Repeat this for remaining colors. Once you set them for different colors, you should have something like this in designer.



Save it and open it in the browser. You’ll see different color rows based on the color field value.



So now if you go and open the web part in edit mode, and see the XSL you will see following written.



Now go to table, select column and then make it bold lettered.



And you can see quantity turning into bold letters



Now we are going to see editing functionality and multi entry on data form web part. For a demo, I have removed the existing web part on a page.

Now find Data View option in ribbon and then manage data sources.



And select stock items colors list. You can select the list you want.

Select the web part and click on inline editing option on the ribbon.



Save it and view it in the browser. You should be able to edit the item without opening it in separate edit page.



You can also select what operation should you allow.



Now coming back to designer, select any empty div on the page and then select title, quantity and color and then click on insert field as multi item form.



And save it and open it to view in browser.



In next post, we are going to see how to use custom actions with the list or library using Designer. Read Part-3 for further reading.

Thursday, June 7, 2012

Understanding Data Form Web Part in SharePoint 2010/ MOSS 2007 – Part 1


We are going to start a new series of data form web part. Data Form web part is one of the most important web part in SharePoint.

 First to start with, let me clear the difference between data form web part and data view web part because this is the most common question arises when it comes to these two web parts.

Data View web part was introduced in WSS 2.0 and Data Form web part was introduced in WSS 3.0. So obviously data form web part is advanced than data view web part. However it depends on what you want to perform.

Data view web part as name suggest only be used to view the data. However data form web part writes back the data to the source as well.

Both web parts can only be created from SharePoint Designer and not from the browser. Both still uses XSLT to transform the data into the representation form. But data form web part uses SPDataSource control to connect with source and fetch the data.

We are going to see what data form web can do.

First it can fetch data not only from SharePoint but also from SQL server, web service, and XML file.

It can also take parameters to display data in it. Parameters can come from query string, it can also be cookie, and it can also be form fields.

So connect with your site via SharePoint Designer. Open a page where you want to add data form web part.

I have one list in site.



Now keep the cursor inside place holder and click on data view and then click on Stock Item colors list.



Once you add it, you get something like this.



At this point of time, just save the file and open the page in browser.



Now go back to designer and select three fields by holding ctrl key and then click on Insert selected field drop down and select multiple items view and you’ll get this.



Again save and check it in browser.



Now let’s go ahead and select the data form web part. Look at the ribbon and you see you can configure different options like group, sorting, filtering and parameters.

Let’s click on sorting option.



Sort by color in ascending order



You can also click on show group header option and you get something like this



Save it and view in the browser.

Now we are going to add parameters. So go back to designer and click on parameters option. By default you will see these two parameters.



Go ahead and click on New Parameter and select type as query string. As you can see you have difference option to define the source of this parameter.



Now we have parameter so we now need to configure the filter based on this parameter.
Select data form web part and then click on filter. Then select color as field and set it like this.



Once set you’ll get this in designer. It does not show any data because there are no colors defined now.



Click on sample data in design tab.



Save the page and open the page in browser.

Initially you will see no data. Pass the parameter and value to see data in the web part.




Continue reading Part -2 for further understanding.



Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com