Hi
I am trying to create a SharePoint 2013 App that also has a Custom Action that has to be visible in Pages tab. Code below
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="COB.SharePoint.Ribbon.NewGroupInExistingTab" Location="CommandUI.Ribbon" > <CommandUIExtension> <CommandUIDefinitions> <CommandUIDefinition Location="Ribbon.Templates._children"> <GroupTemplate Id="Ribbon.Templates.NewGroupInExistingTab.OneLargeExample"> <Layout Title="NewGroupInExistingTabOneLarge" LayoutTitle="NewGroupInExistingTabOneLarge"> <Section Alignment="Top" Type="OneRow"> <Row> <ControlRef DisplayMode="Large" TemplateAlias="Button1" /> </Row> </Section> </Layout> </GroupTemplate> </CommandUIDefinition> <CommandUIDefinition Location="Ribbon.WikiPageTab.Scaling._children"> <MaxSize Id="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup.MaxSize" Sequence="15" GroupId="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup" Size="NewGroupInExistingTabOneLarge" /> </CommandUIDefinition> <CommandUIDefinition Location="Ribbon.WikiPageTab.Groups._children"> <Group Id="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup" Sequence="15" Description="Custome Actions" Title="Oltiva DW" Template="Ribbon.Templates.NewGroupInExistingTab.OneLargeExample"> <Controls Id="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup.Controls"> <Button Id="COB.SharePoint.Ribbon.NewGroupInExistingTab.NotificationGroup.ContentSources" Command="COB.NewGroupInExistingTab.Command.Notify" Sequence="10" Image16by16="/_layouts/images/NoteBoard_16x16.png" Image32by32="/_layouts/images/NoteBoard_32x32.png" Description="Uses the notification area to display a message." LabelText="Content Sources" TemplateAlias="Button1"/> </Controls> </Group> </CommandUIDefinition> </CommandUIDefinitions> <CommandUIHandlers> <CommandUIHandler Command="COB.NewGroupInExistingTab.Command.Notify" CommandAction="~remoteAppUrl/Pages/Default.aspx?{StandardTokens}" /> </CommandUIHandlers> </CustomAction> </Elements>
The above code works fine, but I want the Custom Action to Open in a new Pop up box, like
javascript:SP.UI.ModalDialog.showModalDialog({ url: 'www.google.com', title: 'Default' });
The movement I change the CommandAction to JavaScript, the app breaks, if I remove the ~remoteAppUrl/Pages/.... the app does not work, it does not apper in the site content. and in appcatalog it shows wrong version number and says Valid App package as no. what am I doing