Handle Clicks On Calendar Items In SharePoint 2010 With JavaScript

In some scenarios, you might want to add extended client behavior to a Calendar View in SharePoint 2010. The client-side API of the Calendar View ist not of a great help in every case here. especially, it does not provide an event or hook to catch clicks on calendar items. 

Fortunately, JavaScript itself is powerful enough to allow us injecting such hooks by ourselves. The trick is just to override the API function SP.UI.ApplicationPages.CalendarContainerFactory.create. We just need to wait until the calendar API is loaded and call a function provided by us:Read More »

Updating BDC Models in SharePoint 2010

Using Visual Studio 2010, I created a BDC Model and deployed it to a SharePoint 2010 farm. After a while, I made some modifications to that model, retracted the old feature and deployed the modified feature. Unfortunately, my updates to the model did not appear in SharePoint. In the GAC and in the SharePoint root, I did see my newly deployed assembly, though. What’s wrong?

I turns out that SharePoint obviously stores the BDC model in its database and only overwrites it, when a new model with the same name and a different version is deployed. So in order to update my model, I had to open the bdcm file with an XML editor and modify the element that specifies my model entity:

<?xml version="1.0" encoding="utf-8"?>
<Model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/windows/2007/BusinessDataCatalog" Name="MyBDCModels">
  <LobSystems>
    <LobSystem Name="MyModelAssembly" Type="DotNetAssembly">
      <LobSystemInstances>
        <LobSystemInstance Name="MyModelAssembly" />
      </LobSystemInstances>
      <Entities>
        <Entity Name="MyEntity" Namespace="MyModelAssembly.Models.MyBDCModel" Version="1.0.0.0">
          <!-- entity definition here  -->
        </Entity>    
    </LobSystem>
  </LobSystem2>
</Model>

The element contains an attribute called version. Increment the version specified by this attribute and off you go…