Question

I have implemented a custom ECB Action in this way:

<CustomAction
    Id="ConvertListLevel"
    Location="EditControlBlock"
    Title="Convert to ListItem"
    RegistrationType="ContentType"
    RegistrationId="0x0120007475831FEECFBE4F8B93B41FAC8A2C7200CAEC6AD590466D419F5427BB7597F031">
    <UrlAction Url="/_layouts/CustomActionProcessor/CustomActionProcessor.aspx?ID={ItemId}&amp;List={ListName}&amp;CustomAction=ConvertListLevel" />
</CustomAction>

This works fine on my local dev-machine. The action is only shown when I select a content type with the same ID as declared at "RegistrationId". The problem is, this ID is unique, so when I deploy this on another machine the content type is the same, but has another ID. Is there a way to bind the ECB-Action to a content type using it's name?

Thank you very much!

LMW

Was it helpful?

Solution

I would suggest you deploy your content types declaratively using FEATURES so that you have same content type id everywhere. This will not only help you in this particular case but many other places as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top