Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Why are SPSite's, SPWeb's and SPList's UserCustomActions empty when a custom action registered via a feature's elements.xml?

$
0
0

I made a feature that installs a custom action via an elements.xml file (installed and activated it in a SPWeb).

<CustomAction Id="ChangeBrowseTabTitle"
            Location="CommandUI.Ribbon" 
            RegistrationType="List"
            RegistrationId="100"><CommandUIExtension><CommandUIDefinitions><CommandUIDefinition Location="Ribbon.ListItem.New.Controls._children"><Button Id="Ribbon.ListItem.New.RibbonTest"
              Alt="Test Button"
              Sequence="5"
              Command="Test_Button"
              LabelText="Import"
              Image32by32="~site/SiteAssets/EM.SharePoint.ImportList/fileimport32.png"
              Image16by16="~site/SiteAssets/EM.SharePoint.ImportList/fileimport16.png"
              TemplateAlias="o1" /></CommandUIDefinition></CommandUIDefinitions><CommandUIHandlers><CommandUIHandler Command="Test_Button" CommandAction="javascript:alert('That's me!');" /></CommandUIHandlers></CommandUIExtension>

Then I ran a console app that checked all the

  • SPSite.UserCustomActions
  • SPWeb.UserCustomActions
  • SPList.UserCustomActions

in a web, where I registered the custom action.

But all the UserCustomActions collections are empty .

Did anyone encounter such a magic?

(The test was made on SharePoint 2013 Foundation October'13 CU).




v



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>