Pascal Bonheur

Just another SharePoint/.NET weblog

Browsing Posts published by Pascal Bonheur

One of the most common question I get when I demo SharePoint 2010 is why the Windows Explorer view doesn’t work on the server itself.

By clicking on the Explorer View button

clip_image001

, the following error message appears

clip_image002

To make it work, just install the Desktop Experience feature :

image

and it will work :

scl1

Depending on the language that you use when you browse the site, the alert will be created with the appropriate language.

The following procedure gives more explanation:

1. Create an alert when I navigate the site in English :

image

2. I received the following mail to confirm that my alert has been created:

image

3. Create the exact same alert on the same Document Library but this time when I navigate the site in French:

image

4. I received the confirmation in French for this address:

image

5. I have now two alerts on the same Doc Lib, one that has been set while I was browsing the site in English and one other when I was browsing the site in French.

 

6. If I add a document in this document library, I receive the two following mails:

image

image

The title of the alert has been translated (Documents Partagés – Shared Documents) but the content doesn’t seem to be translated. Let’s hope this is a bug that is going be fixed in the RTM.

Common situation when designing workflow is that you start to design workflow in SharePoint Designer and then you want to add some code in Visual Studio.

In the following example, I will go through the procedure to create a workflow in SharePoint Designer and then open it and deploy it from Visual Studio.

Let’s start by creating a reusable workflow in SharePoint Designer

scl4

Enter the workflow information

scl5

and then just implement one step to set the document status to approve:

scl6

Next, in order to be able to reuse it in all the sites from site collection in SharePoint, publish the workflow globally:

scl17

Save the workflow and then Save it as a template :

scl8

You should see the confirmation :

scl7

Now, if you go to the Site Library, you will see this:

scl9

Save the .wsp localy and then, open Visual Studio and choose to import a workflow:

scl10

You can deploy it as a sandbox:

scl11

and select your .wsp and all the elements included in the .wsp:

image

Wait for importation to be completed:

scl12

Then deploy the solution:

scl13

If you have already saved it in SharePoint Designer, you will have a conflict and see this:

image

Just select Resolve Automatically to delete the workflow deployed by SharePoint Designer.

From the website, you should now see that the feature corresponding to this workflow is activated:

scl14

Then add the workflow on a document library:

scl16

Then, start a workflow on a document:

scl18

Very Nice Feature ! In one of my next post I will explain how you can change the workflow and redeploy it…

A lot of customers  are going to use SharePoint 2010 in order to do video collaboration.

Indeed, in the previous version customers needed to buy third-party (like Bamboo Video Web Part) to display video inside SharePoint pages. In this current version, a native Media Web Part can be used to do that.

This Media Web Part can be used to display Web Parts stored in a SharePoint Library (Asset Library) or store on streaming sites like www.youtube.com.

One of the need that customers have is that they need to be able to check and control what is display in this video like the format of the video to be uploaded or the link to the site that is streaming the video.

Obviously, this can be done through the Object Model with an Event Handler. If let’s say for instance, you want to prevent people from adding video steamed by youtube…

You can create an event handler on the library that contains all the pages :

<Receiver>
       <Name>EventReceiverItemUpdating</Name>
       <Type>ItemUpdating</Type>
       <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
       <Class>VideoCollaboration.EventReceiver.EventReceiver</Class>
       <SequenceNumber>10000</SequenceNumber>
</Receiver>

and in the code of the event handler, you loop through all the Web Parts of type Media and change the link if it links to youtube:

public override void ItemUpdating(SPItemEventProperties properties)
{
    this.EventFiringEnabled = false;
    SPListItem currenItem = properties.ListItem;
    SPFile currentFile = currenItem.File;

    Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager wpMng = currentFile.GetLimitedWebPartManager(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);

    foreach (System.Web.UI.WebControls.WebParts.WebPart currentWp in wpMng.WebParts)
    {
        if (currentWp is Microsoft.SharePoint.Publishing.WebControls.MediaWebPart)
        {
            Microsoft.SharePoint.Publishing.WebControls.MediaWebPart currentMedia = (Microsoft.SharePoint.Publishing.WebControls.MediaWebPart)currentWp;

            if(currentMedia.MediaSource.toLower().contains("www.youtube.com"))
             currentMedia.MediaSource = "
http://www.otherlink.com";
            wpMng.SaveChanges(currentWp);
        }

    }
    currentFile.Update();

    this.EventFiringEnabled = true;

    base.ItemUpdating(properties);
}

and then, no video linked to youtube will be allowed…

MUI in SharePoint 2010 seems to lack some very basic features…

Let’s do a typical scenario :

  1. Create a document library (choose Display on QuickLauch). Let’s call this library My own doc lib
  2. Display this library on your site home page
  3. You should see this :

scl2

Next step is to translate My own doc lib to Ma propre librarie in French. To do that, we export the .resx file in French, translate the term Ma propre librarie :

scl3

and then re import the .resx.

Now, the site display the following in French :

image

As you can see the title has properly been translated in the WebPart title but not in the menu. And guess what… no entry for the menu in the .resx file….

Let’s hope this multilingualism bug will be fixed for the RTM.

For those of you who have try to have a look at administration pages in SharePoint 2007 to understand how things works, it may not be possible to do the same in SharePoint 2010.

In SharePoint 2007, we used to have the Microsoft.SharePoint.ApplicationPages namespace defined in Microsoft.SharePoint.dll and this assembly was readable from .NET Reflector:

scl1

Now, in SharePoint 2010, the administration pages (cf. importranslations.aspx) inherits the Microsoft.SharePoint.ApplicationPages assembly… and guess what, this assembly is not readable from .NET Reflector :

scl2

If you have any clue on this, feel free to respond to this post !

You may have heard about the buzz around xRM… This technology is not new and some  major companies like salesforce are using it and Microsoft is currently pushing this concept…

So what is xRM : it is basically a way to use CRM to manage anything that is based on relationship. So for instance, if you want to manage properties, blogs… you can use the CRM and change all the built-in entities so that it matches your need.

It means that xRM can be considered as a database that Power-Users can design… They can also design the screen to display this entities. What is very nice is that everything like reports, search, filtering is already built-in so you may save a lot of time on development.

On the other hand, it may become hard to customize entities for very complex business needs : you can do custom Javascript and also custom workflow but you don’t have the same flexibility as custom development.

Here is a very interesting article about the integration between xRM and SharePoint : xRM and SharePoint

Hello everyone, welcome to my blog !

The SharePoint community is getting bigger and bigger every day and there is a huge amount of content available on the Web about SharePoint. With this blog I will try to add new content on a regularly base … and most of the content will be oriented on SharePoint 2010…

If you have any comment, feel free to post it, your feedback is always greatly appreciated…