Online Training On SharePoint
                      

Thursday 7 January 2010

Creating Custom Actions using SharePoint Designer 2010

Using SharePoint Designer 2010 we can add custom actions to our list and document library. These custom action can appear in the menu which appears when we right click each individual item or in the ribbon. These custom action can navigate to a form for the list, Initiate a workflow which is associated to the library or can navigate to a new URL.
With SharePoint 2007 if the user needs to initiate a workflow they need to go the workflow page and and then do the same. With Custom Actions this can be simplified a lot. So with this post I will try to explain how to create a custom action using SharePoint Designer 2010 to initiate a workflow.
I have created a list and added a OOB Approval workflow to it. Now we need to open the list in the SharePoint 2010. On the list setting dashboard there is a section for the custom actions or we can do it from the ribbon for the list menu.

I have put the name for the Action as "Send For Approval". Also the Initiate Workflow will show all the associated workflows on the list. Select the workflow which we need to trigger with the custom action. Just say OK and we are done. Lets see how this custom action looks like:


The Action has come in the menu. Now we will try some more advanced option to change the location and associate a icon with this.

Just we need to specify a sequence number and an icon file in these options. Now see how it looks like:



Doing this was not so easy in SharePoint 2007. We need to do this using feature and XML files which was complicated process.
We can also add menu items in the ribbon in the forms for adding New Item, editing item and viewing item using the same concepts.

Now we will add a button in the ribbon when we see the details for the list item. We will add a button which will print the list item. To do this select

Select Display Form Ribbon and fill the details like the below.


Now if we open a list item for viewing we will see a addtional button appearing on the ribbon for print as below:

No comments:

Related Posts with Thumbnails