Monday, April 27, 2009

SharePoint Custom Actions

SharePoint Custom Actions:

So far, I came across requirement of customizing out of box sharepoint pages (like create.aspx, spcf.aspx, qstnew.aspx) to fullfill client need to add functionality or custom code in those pages. As you know, although we can modify these pages but must not because any patch installation or anything else will owerwrite them back to default and we will loose our code. So we have to make copy of those pages and add custom link on page from where its getting called.

Example : If you require to override the WebPart Page/Survey Creation Page spcf.aspx/new.aspx) then you have to add link under particular Group in Create.aspx page. This you can achieve without writing any code in create.aspx by creating Feature using CustomActions.

SharePoint provides so many default CustomActions which we can use as per our creativity.

Code example : To add custom link in Site Actions Ment which takes user to custCreate.aspx page





http://msdn.microsoft.com/en-us/library/bb802730.aspx : Various default custom actions.
http://msdn.microsoft.com/en-us/library/ms473643.aspx : How to do it.