• Call Toll Free: 1-855-909-3300

How To Create The Edit Control Block Menu Item

ECB or Edit Control Block is the context menu which displays all the items in SharePoint Lists and Document Libraries. If you are for the ECB menu in SharePoint this article will guide you to create ECB menu in SharePoint as well as help you to modify the list item context menu which will aid you to include items that initiates the Word Automation Services document conversion job.

Host your Accounting Software in secured Cloud

Below are some simple and easy steps you can follow to create ECB menu in SharePoint

Create a New Feature

  • Add Feature by right clicking Features in the Solution Explorer.
  • Add a title for the new feature such as Convert Document.
  • Use a small description for the feature.
  • When prompted, accept the Web default feature scope, this will give the SharePoint Server 2010 administrators the ability to either enable or disable the feature depending on need.

Context Menu Item

  • To create or modify, you need to first create a new feature and add a new context menu item. You can create a new feature by:
  • Right click the project, point to add and click new item in the Solution Explorer.
  • Select Empty Element to create a blank element in the Add New item dialog, where you can add the XML code which will outline the content menu item
  • Give a name for the element
  • Add the new element to the project by clicking Add. You should see the new element in the Solution Explorer.

Double-click the Elements.xml in the Solution Explorer to open and edit.

Add the following XML code in the <Elements> element  <CustomAction Id=”ConvertDocument” RegistrationType=”FileType” RegistrationId=”docx” Location=”EditControlBlock” Sequence=”106″ Title=”Convert Document”></CustomAction>

Attractive Plans Available for Application Hosting

Add the following XML code in the <customaction> element.

XML Code (<UrlAction Url=”~site/_layouts/ConvertItem/ConvertItem.aspx?ListId={ListId}&amp;ItemId={ItemId}&amp;ItemUrl={ItemUrl}”/>)

This XML code will define a URL to a SharePoint web page which opens when a user invokes this custom action. The URL starts with ~site/, this resolves to the URL of the current SharePoint Server 2010 site. This URL will also specify three query parameters and their associated tokens, such as:

{ListId}, which resolves to the ID of the parent list.

{ItemId}, which resolves to the ID of the list item.

{ItemUrl}, which resolves to the site-relative URL of the list item.

Leave a Reply

Techarex NetWorks Products