Sp-dev-docs: Deploy only on specific custom list

Created on 24 Jan 2019  路  10Comments  路  Source: SharePoint/sp-dev-docs

[X ] Question

  • [ ] Typo
  • [ ] Bug
  • [ ] Additional article idea

Hello. How to deploy the button only on specific list. No on all custom list but only on specific list with same name. Thank you

Author Feedback community no-recent-activity answered question

All 10 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

Can you expand a bit more on what you mean? It's a bit unclear.

Like noted by @bcameron1231, we would need slightly more details to answer. Is this for SPO, SP2019, SP2016, SP2013 or SP2010? Are we talking about SharePoint Framework and modern experiences?

Sorry my mistake. I forgot to say...

  1. SharePoint Online
  2. Community Site (Modern New Design)
  3. SharePoint Framework Extension - Command Set
    I am preparing complex application in modern design for example I have 10 List and every list will have two special buttons... So very easy task..
    But the problem is that I need to add these buttons only to specific lisst So I need to register these buttons not directly on all CustomList (RegistrationId = 100) but directly on the list1 list2 list3...list10....

I think that this is not possible right now and only chance to do this is check URL get info about the list and set visibility to false if is not correct list....

But this is not effective at all if I will have 100 buttons?
Hmm...

I very very like SPFX and also extension features but I am still missing base functionality which was in old UI...I know that SPFX I can vote for some features but I think for example to write something like this is not so much complicated because in workbench I am connections this button directly on specific list....Hmm....
Thank you very much for any help

The controls you currently have (described here - https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/basics/tenant-wide-deployment-extensions ) allow you to execute the extension on a particular WebTemplate and ListTemplate.

From a feature / forward looking perspective, what additional configuration property would you need?

Alternately, you can simply register the extension only on the particular list instance you are interested in. (ie, register the customaction on ListInstance1 and ListInstance2. Depending on how you create those lists, you should be able to have the custom action registration be part of the list creation.

Does that help?

Hello. I am very sorry but I am not sure If I understand you correctly:

  1. In SharePoint we have some base template IDs: https://msdn.microsoft.com/en-us/library/dd958106(v=office.12).aspx
  2. I could save list as a Template .... But it will still have a List Template ID as a Generic List for example
  3. "Alternately, you can simply register the extension only on the particular list instance you are interested in." Please I don't understand this... How to achieve this... For example I have Generic List with name "List1"
  4. And what I am missing....for example registering button for specific content types...But yes yes I can achieve this in visibility settings...
    Again thank you for your help.

"Alternately, you can simply register the extension only on the particular list instance you are interested in." Please I don't understand this... How to achieve this... For example I have Generic List with name "List1" I have Generic List with name "List1"

You're likely going to have to do this programmatically with the SharePoint REST API / CSOM by getting a reference to the list. Each list object has a CustomActionElements collection and each CustomActionElement has a ClientSideComponentId & ClientSideComponentProperties... similar properties you see in the XML generated by the SPFx generator.

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.

Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently.

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

Was this page helpful?
0 / 5 - 0 ratings