0

I am following below article and was able to add custom action to a library. But unable to do so for List as I do not know the location. I want to get the same location of Location="Ribbon.Documents.Copies.Controls._children"> for a list. Is there a guide with locations applicable to modern list view?

https://msdn.microsoft.com/en-us/pnp_articles/modern-experience-customizations-customize-lists-and-libraries

<pnp:CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Documents.Copies.Controls._children">
          <Button
            Id="Ribbon.Documents.Copies.OfficeDevPnPDownloadAll"
            Command="OfficeDevPnP.Cmd.DownloadAll"
            Image16by16="/_layouts/15/images/sharepointfoundation16.png"
            LabelText="Download All"
            Description="Download all files separately"
            ToolTipTitle="Download All"
            ToolTipDescription="Download all files separately"
            TemplateAlias="o1"
            Sequence="15"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          Command="OfficeDevPnP.Cmd.DownloadAll"
          CommandAction="https://contoso.azurewebsites.net/pages/index.aspx" />
      </CommandUIHandlers>
    </pnp:CommandUIExtension>
  • change the Location and <Button Id to <button id="Location="Ribbon.ListItem.Actions.Controls._children"" and check – Gautam Sheth May 26 '17 at 8:20
  • @GautamSheth Does not work in modern experience. – Damitha May 26 '17 at 10:36
0

try this Ribbon.ListItem.Actions.Controls._children for Location

MSDN References :

Default Server Ribbon Customization Locations

CustomAction Element

  • This does not work in modern experience. This only works in classic mode and appears as a list item action, not a list action. – Damitha May 26 '17 at 10:33
  • try this CommandUI.Ribbon.ListView – TARUN May 26 '17 at 10:40
  • I assume that is for CustomAction location and not CommandUIDefinition location. Yeah it is working on classic mode. But not in modern experience. – Damitha May 26 '17 at 10:45
  • It works. There was an error in my CommandUIDefinition . – Damitha May 29 '17 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.