sharepointsharepoint-2007custom-actionsharepoint-feature

SharePoint - CustomAction isn't showing on toolbar for a content type


I've created a feature with a content type:

<ContentType ID="0x01007C963A8770A24bbfBDBCE157B96EE769"
             Name="Send" Group="Demo" Version="1">
</ContentType>

I want to create custom actions for this content type.
This works on the ECB (the popup menu of every item's title):

<CustomAction
    Id="Demo.Send.PopupMenu"
    Title="Send"
    Location="EditControlBlock"
    Description="Hold"
    RegistrationType="ContentType"
    RegistrationId="0x01007C963A8770A24bbfBDBCE157B96EE769">
      <UrlAction Url="http://www.google.com/search?q={ItemId} Cookies"/>
</CustomAction>

However, I can't get it to work on forms' toolbars (edit or display):

<CustomAction
    Id="Demo.Send.DisplayFormToolbar"
    Title="Send"
    Location="DisplayFormToolbar"
    Description="Send"
    RegistrationType="ContentType"
    RegistrationId="0x01007C963A8770A24bbfBDBCE157B96EE769"
    Sequence="108">
       <UrlAction Url="http://www.google.com/search?q={ItemId} Cookies"/>
</CustomAction>

I don't get any error message, I just can't see the button.
It is working if I change the RegistrationId to 0x01, but then I see it on all content types (all items, really).

Any idea what's wrong with this code?


Solution

  • I seem to remember there being issues with content types when they didn't have all capitals in the identifier, both for the definition and when using.

    Try

    RegistrationId="0x01007C963A8770A24BBFBDBCE157B96EE769"
    

    But completely remove the everything that refers to the content type. (or try a new one)