Forum Discussion
Peter Cheung
May 12, 2018Brass Contributor
deploy spfx command set for doclib is not working
Hi
I have successfully deploy a spfx command set for custom list, which is RegistrationId=100, now i want to deploy it to document library, so i set it to 101 but doesn't working. The command set still deployed to custom list, it looks like this setting never take effect. Please help. Thanks Peter
<?xml version="1.0" encoding="utf-8"?>
<CustomAction
Title="HelloWorldCommandSet"
RegistrationId="101"
RegistrationType="List"
Location="ClientSideExtension.ListViewCommandSet"
ClientSideComponentId="422de19f-6007-474b-9d4d-b880595b0291"
ClientSideComponentProperties="{"sampleTextOne":"One item is selected in the list.", "sampleTextTwo":"This command is always visible."}">
</CustomAction>
</Elements>
Peter Cheung i know this is a late response, but this is to help anyone else having this problem since this question is surfaced in search results
what you have to do is change the xml files in the spfx project found under sharepoint > assets
in ClientSideInstance.xml change ListTemplateId (and in elements.xml change RegistrationId) from 100 to 101, so to make it show up in custom lists you use 100, and you use 101 to make it show up in document libraries
if you need to use both at the same time, just copy and paste the xml chunks for ClientSideComponentInstance and CustomAction in their respective files
here is a link with a more thorough description plus pictures:
hopefully this saves someone some time 🙂
1 Reply
Sort By
- JR2021Brass Contributor
Peter Cheung i know this is a late response, but this is to help anyone else having this problem since this question is surfaced in search results
what you have to do is change the xml files in the spfx project found under sharepoint > assets
in ClientSideInstance.xml change ListTemplateId (and in elements.xml change RegistrationId) from 100 to 101, so to make it show up in custom lists you use 100, and you use 101 to make it show up in document libraries
if you need to use both at the same time, just copy and paste the xml chunks for ClientSideComponentInstance and CustomAction in their respective files
here is a link with a more thorough description plus pictures:
hopefully this saves someone some time 🙂