Monday, 25 November 2013

SharePoint 2007 Lookup Column vs SharePoint 2010

Cascade Delete
SharePoint 2007 : The Lookup column in SharePoint 2007 does not support cascade delete. i.e. if If an Item\Value in the the look-up list is deleted, then all those items referencing that value (as look-up value) will not be delete. This will rather present you with various errors and can also cause errors on the Site page if your are using one of them as filters.

SharePoint 2010 : If an Item\Value in the the look-up list is deleted, then all those items referencing that value (as look-up value) in other lists will also be deleted.


Restrict Delete


SharePoint 2007 : Does not have option to restrict deleting of lookup list items\values.

SharePoint 2010 : Choosing this option would restrict the users from deleting an item in the column in the Look-up list, if the value is being used in some other lists.


Number of columns displayed


SharePoint 2007 : This will only display the chosen lookup column in the referencing list.

SharePoint 2010 : You can now display additional columns from the look-up list, along with the chosen lookup field.

Friday, 25 January 2013

Difference Between Event Receivers and Workflows in SharePoint

1. Event handlers Can't be manually initiated - workflows can be initiated either automatically or manually.

2. Event Handlers can be Synchronous or Asynchronous - Workflows are always async (They executes after the operation)

3. In Event Receivers we can cancel the operation (such as add/update/delete) - But in Workflows its not possible.

4. Event handlers execute from a Particular WFE, So when something goes wrong in that WFE, It may end-up. But Workflow Jobs are robust and can resume even after Reboots.

5. Usually Event handlers runs for short period - Workflows can be longer even for years!

6. There is no User Interface/user Interaction in Event Receivers - Workflows can have user interactions such as getting user input in Initiation forms.

7. As the Name indicates, SharePoint Event receivers are triggered by events like New Item Adding-Added, Updating-Updated, Deleting-Deleted, etc. - But Workflows triggered only on Creation/Change/deletion.

8. Event Receivers are created using Visual studio - Workflows can be via SharePoint user interface, SharePoint Designer, Visio or Visual studio.

9. Workflows leave "Workflow History" logs which we can refer for debugging - Event handler doesn't do such.

10. Event receivers are better for large volume - Workflows are better for small amount of data.

SharePoint Solution Packages

Wednesday, 18 July 2012

Bind lookup field data to the dropdownlist

Below code will help you to bind the lookup field data to the dropdown list.
if (spListItem["LookupField"] != null)
{
  SPFieldLookupValue spv = new   
  SPFieldLookupValue(spListItem["LookupField"].ToString());
  string lookupValue = spv.LookupValue;
  dropdownlist1.SelectedIndex = spv.LookupId;
 }
 To bind field values to the dropdownlist:
dropdownlist1.SelectedValue = spListItem["Field1"].ToString();