El Blanco's Office 2007 Blog

Tuesday, March 11, 2008

Another Bug with a CustomAction in the Actions Menu

I have found another bug with a CustomAction element which adds an item to the Actions menu on a document library:

<CustomAction Id="SomeCustomAction"
RegistrationType="List"
RegistrationId="101"
GroupId="ActionsMenu"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="Some Custom Action"
Description="Does something interesting.">
<UrlAction Url=""/>
</CustomAction>

The new menu item defined above appears in the Actions menu for document libraries, and it appears as the last item in the menu, right at the very bottom.

My issue is that I can't seem to get the menu item to be present anywhere but at the bottom i.e. what if I wanted the menu item to appear as the first item in the Actions menu? I've set the Sequence attribute to various different values, but this appears to have no effect - so far I've not managed to change the positioning of the new menu item and it always appears at the bottom of the Actions menu.

Has anyone else created a CustomAction for the Actions menu and managed to get it to be positioned elsewhere in the menu? If so, please get in touch !!

2 Comments:

  • I had a similar issue with creating a new type of Custom List. No matter what Sequence="nnnn" value I gave it, it always sorted to the number three slot under Custom Lists. The problem is, unless ALL items have a Sequence="nnnn" value, those that don't (including several Microsoft-supplied ones) will "sort in an arbitrary manner at the end". I'll bet good money that is what is happening to your menu item.

    By Anonymous Anonymous, at 4:23 pm  

  • Fred,

    I've come accross your issue before regarding sequences for custom lists. What you need to do is also use the "Category" attribute in your <ListTemplate> element e.g. Category="Tracking" will put your list definition in the "Tracking" column. The sequence attribute then determines where in that column it appears.

    Hope this helps,

    Chris

    By Blogger Chris White, at 4:48 pm  

Post a Comment

<< Home