Thursday, May 27, 2010

Stsadm to Windows PowerShell mapping (SharePoint Server 2010)

Microsoft has published a very useful new article on Technet that lists STSADM operations and their equivalent PowerShell cmdlets. Check this link.

Thursday, May 13, 2010

Disable event firing in sharepoint when updating list item

Below piece of code can be used to update SharePoint list item inside any event receiver. I have written it for Updated event receiver.


public override void ItemUpdated(SPItemEventProperties properties)

{

//some handling here

ListItem item = properties.ListItem;

item["someproperty"] = "some value";

this.DisableEventFiring();

//save changes added

Item.Update();

this.EnableEventFiring();

}