14

Fun stuff, I was checking this site since I stopped answering SO SharePoint questions for a few years now and this was the first thing in the list, a very interesting oversight during the "host web Feature" option for CustomActions. What a detailed investigation! Luckily I have a solution for you. WEB STANDARDS TO THE RESCUE CHO CHOO With Microsoft ...


4

You have misunderstanding of using CustomActionGroup. It uses for creating groups not in ribbon, but in sharepoint pages, for example in site settings. Chris O'Brien has written good blog posts about ribbon customization here. And if you have doubts how to create ribbon button or group, it is good idea to digg into cmdui.xml (this file contains definition ...


4

I totally agree that this is inconsistent and a bit misleading. Assuming that tranforming the solution to the Sandbox is a none starter, a few thoughts... You could maybe re-scope the feature to the Web (I'm assuming that it is currently the scoped at the Site) and the just activate it on the root web. That would probably raise another issue though as I ...


4

It should work: <UrlAction Url="javascript:void(window.open('http://www.google.com','_blank'))"/>


4

This can be achieved to a certain extent if you, for example, create a list view with appropriately formatted list items and a SharePoint Designer custom action with a javascript like javascript:{ (function() { var myctx = SP.ClientContext.get_current(), selected = SP.ListOperation.Selection.getSelectedItems(myctx), list = []; for (var item in ...


4

Try using this code for adding custom action to the site settings page. // Add site settings link UserCustomAction siteSettingLink = clientContext.Web.UserCustomActions.Add(); siteSettingLink.Group = "SiteTasks"; siteSettingLink.Location = "Microsoft.SharePoint.SiteSettings"; siteSettingLink.Name = "Sample_CustomSiteSetting"; siteSettingLink.Sequence = 1000;...


3

It is a two step process. The Location="CommandUI.Ribbon.DisplayForm" of CustomAction specifies that a button will be added to Display form. And Location="Ribbon.ListForm.Display.Manage.Controls._children"> of CommandUIDefinition specifies that it will be added to the Manage tab of the Display form. Full Example: <CustomAction Id="...


3

Yes there is. Take a look at the contents of this - C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\GLOBAL\XML\CMDUI.xml. You'll find all the locations.


3

You can do that with HideCustomAction. You can get GroupId and HideActionId from the action itself. The custom action is as below (taken from C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\TEMPLATE\FEATURES\IPFSSiteFeatures\FormSettings.xml) <CustomAction Id="IPFSSettingsListEditPage" RegistrationType="List" ...


3

I didn't really expect anyone to "chase this down" for me, so I spent some time doing a lot of digging on my own. The short answer (as of January 2013) is "no" - there doesn't appear to be any way to leverage tokens like ~appWebUrl in the Image32by32 and Image16by16 attributes. The way that the image attributes are processed is inherently different than the ...


3

Should you not do UserCustomAction.Update() after you set the new script source? (also you may want to store the action in a variable: try{ $theAction = $customActions.GetById($Id) $theAction.ScriptSrc = $ScriptSrc $theAction.Update() $context.ExecuteQuery() Write-Host "CustomAction $Id updated" -ForegroundColor Green } catch{ Write-...


2

Create a custom ASP.NET page e.g. ApplPage1.aspx and then let user navigate to this page like this, <UrlAction Url="_layouts/TestProject/ApplPage1.aspx"> Now in your Page.Load event of ApplPage1.aspx, check user's identity using, SPWeb theSite = SPControl.GetContextWeb(Context); SPUser theUser = theSite.CurrentUser; string strUserName = theUser....


2

If your SP app has a remote web in the solution, you can store the image in you remote app and use the token ~remoteAppUrl to correctly resolve the URL to that image. For some reason MS wired up ~remoteAppUrl correctly but did not do the same for ~appWebUrl. Hopefully they will fix that in the future.


2

Use __doPostback method on the client: __doPostback('myPostBack',''); Then, on server you should have something like this: const string myPostBackId = "myPostBack"; public override CreateChildControls() { // ... if (this.Page.Request["__EVENTTARGET"] == myPostbackId) { string textBoxValue = this.Page.Request["__EVENTARGUMENT"]; ...


2

I was originally going to suggest this location: Ribbon.WikiPageTab.PageActions But i did a quick search and this guy's blog has more detailed information. http://sanderschutten.blogspot.com/2010/05/adding-buttons-to-mss2010-ribbon.html


2

There is out of the box support for opening a dialog from custom action. Add following attributes to the CustomAction XML node -- HostWebDialog : Set it to true if you want to open a dialog HostWebDialogWidth: Width of the dialog HostWebDialogHeight: Height of the dialog For more information go to my blog here. Hope this would help you.


2

Custom action groups uses for creating groups not in ribbon, but in sharepoint pages, for example in site settings. If you want to create group in ribbon with button or other controls, you should provide three required CommandUIDefinition- GroupTemplate, Scaling and Group with controls. You can refer this article for clear understanding.


2

You can make use of delegate control feature. Refer this link for more information Delegate Control Delegate control is alternative to master page / page layouts.


1

There are two ways how to do it: Add a custom action and set RegistrationType="List" and RegistrationId="ListTemplateID". E.g.: <CustomAction Id="DMS.ContentTypes.RegistryOwnerCustomAction" RegistrationType="List" RegistrationId="101" Location="Microsoft.SharePoint.ListEdit" GroupId="GeneralSettings" ...


1

In the options add dialogReturnValueCallback: DialogCallback and add the callback function where you refresh the page when you want. The complete code: var options = { url: _spPageContextInfo.webAbsoluteUrl + '/_layouts/15/xx/Pages/Page.aspx', tite: 'Edit Properties', allowMaximize: false, showClose: true, width: 800, height: 600, ...


1

You can try a workaround for this by referencing the JQuery from the custom script file instead of the master page. Here are the steps: Remove the JQuery reference from the master page. Add document.writeln('<script src="PathToJQueryFile" type="text/javascript"></script>'); as the first line in MyNewJS.js file


1

Use Location="CommandUI.Ribbon" instead of Location="CommandUI.Ribbon.EditForm".


1

this been answered in the following post: Add button to Ribbon.PublishTab.Publishing <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="Ribbon.PublishTab.Publishing.CheckLinkedPageItems" Location="CommandUI.Ribbon" RegistrationType="List" RegistrationId="850" ...


1

update you location attribute with Location="CommandUI.Ribbon.EditForm" and add rights attribute in custom action Rights="EditListItems"


1

I think you are missing Maxsize element, try by adding the following code after section <CommandUIDefinition Location="Ribbon.ListForm.Edit.Scaling._children"> <MaxSize Id="Ribbon.ListForm.Edit.MaxSize" Sequence="15" GroupId="Ribbon.ListForm.Edit.Groups.CustomGroup" Size="NewGroupInExistingTabOneLarge" /> ...


1

The code you shared copies the documents in the "Shared Documents" destination Library. However, as I understand your issue, you don't want to hard code the library name. Instead you want to select the library name out of several possible libraries. This can be done by creating a page preferably a layouts page and placing a drop down box containing the names ...


1

As you could maybe see from links exposed by Robert, these are quite fixed (even more than MSDN Ids http://wiki.customware.net/repository/pages/viewpage.action?pageId=69173255) as defined in the platform. To my knowledge, you cannot add your own, but you could add your own items or hide items via Custom Actions. You could use the Control Delegate (http://...


1

It's definitely possible. Open the document library in SPD. You will have "Custom Action" button on the ribbon, where you can select "List Item Menu" custom action: Then, on the form which appears, use vertical scrollbar (many people don't notice it's there) to scroll the contents of the form down. You will see "Rights" box there: Unfortunately it's just ...


1

Open Elements.xml file of custom action and add following attributes in tag. HostWebDialog="TRUE" HostWebDialogWidth="600" HostWebDialogHeight="400 and then in your aspx page add <WebPartPages:AllowFraming ID="AllowFraming" runat="server"/> For detail documentation go to this link - How to create custom action opens in ...


1

You could also create an application page which you pass the GUIDs of the selected items via a JavaScript redirect. currentsite/_layouts/AppPage?GUIDS=guid1,guid2&ReturnURL=/Pages/currentpage. Have your code complete the request then redirect to the list view via the ReturnUrl paramater.


Only top voted, non community-wiki answers of a minimum length are eligible