2

I am trying to make a Custom Ribbon Action within Visual Studio. This works perfectly fine but I would like the Custom Action to reside in a custom group. I've seen lots of helpful(ish) threads/videos out there and nothing is working. I keep getting errors at runtime despite following the instructions to the T. I have stepped back to the Custom Ribbon Action at it's bare bones and am looking for any helpful input as to how I can move the Custom Action into it's own group.

UPDATE: I tried doing this on a SharePoint 2013 on prem instance and everything works perfectly fine. Is this some type of limitation with SharePoint Online? Is there a workaround?

Here is the Elements.xml file:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="458f7307-01fd-4fa8-9da3-e47e8e719ab5.RibbonCustomAction1"
                RegistrationType="List"
                RegistrationId="115"
                Location="CommandUI.Ribbon"
                Sequence="10001"
                Title="Invoke &apos;RibbonCustomAction1&apos; action">
    <CommandUIExtension>
      <!-- 
      Update the UI definitions below with the controls and the command actions
      that you want to enable for the custom action.
      -->
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Library.Settings.Controls._children">
          <Button Id="Ribbon.Library.Settings.RibbonCustomAction1Button"
                  Alt="Request RibbonCustomAction1"
                  Sequence="100"
                  Command="Invoke_RibbonCustomAction1ButtonRequest"
                  LabelText="Request RibbonCustomAction1"
                  TemplateAlias="o1"
                  Image32by32="_layouts/15/images/placeholder32x32.png"
                  Image16by16="_layouts/15/images/placeholder16x16.png" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler Command="Invoke_RibbonCustomAction1ButtonRequest"
                          CommandAction="~appWebUrl/Pages/Default.aspx?{StandardTokens}&amp;SPListItemId={SelectedItemId}&amp;SPListId={SelectedListId}"/>
      </CommandUIHandlers>
    </CommandUIExtension >
  </CustomAction>
</Elements>

Do I need to create the custom group in an external file or do I use what's already there in Elements.XML and modify it?

  • Are you deploying it to SharePoint online using an App or Sandbox solution? I don't see anything unusual in the XML here. Also, what permission does user (who deploys it) have? – Kiran Chauhan Aug 20 '14 at 10:02
  • I'm deploying it to SharePoint Online (SharePoint App). I have the highest permissions to the site. – mwilson Aug 21 '14 at 5:18
2

This is not possible with pure SharePoint Online/O365.

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.