ClientSideExtension.ListViewCommandSet.ContextMenu for ContentType
Category
- [ ]Idea
Desired Behavior
Can I add custom menu for item in list / library, but only for concrete content type?
Business Case
This will help the developers to add list item context menu, also known as the Edit Control Block (ECB) menu, to include an item that initiates the Word Automation Services document conversion job.
Example

https://github.com/SharePoint/sp-dev-fx-extensions/issues/13#issuecomment-310012779
Hey @sprider - I don't believe you can target a CustomAction to a single content type, but one workaround would be in your commandset extension take a look at the selected item and only set the visibility to true if it meets your requirements. Let me know if you need more direction to do that.
Hi @patmill - Thank you Pat.
That is a good idea. Vesa mentioned that it is a good idea to have content type based and may include in future.
Let us see.
@ahackettms FYI
How to allow Commandset to work for both Custom Lists and Document Libraries (Template type 100 and 101)? Thanks!
@vandanamuc Two registrations in the elements.xml... one for each type of list, but using the same component.
@andrewconnell - Thanks a lot for the response. Will try this option.
We closed this issue as it had not activity within last 180 days. This is a generic process we have decided to perform for issues, which have not been explicitly marked still to be "work in progress" based on tags. We are performing this cleaning to make sure that old issues that have already been solved (but not closed) or are no longer relevant are cleaned out and make the issues more manageable. If this issue still valid, we would ask you to open a new issue and follow the guidance in the issue template related on the recommended location. We do apologize any inconveniences this might cause. Please do remember that issues in the issue lists are also messages for others in the community, so you can also check if you can assist on any of them. “Sharing is caring!”
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues