8

http://msdn.microsoft.com/en-us/library/ff458385.aspx: {SiteUrl} – The fully qualified URL to the site (Url). The SharePoint code proves it - here's the SPCustomActionElement.ReplaceUrlTokens method: internal static string ReplaceUrlTokens(string urlAction, SPWeb web, SPList list, SPListItem item) { if (string.IsNullOrEmpty(urlAction)) ...


7

Here is some js that should load efter the ribbon is loaded: SP.SOD.executeOrDelayUntilScriptLoaded(function() { // Your code here }, "sp.ribbon.js"); More about modifying in this blogpost Edit: // Fires ‘ribbontabselected’ after the ribbon has been initialized after load ExecuteOrDelayUntilScriptLoaded(function () { var pm = SP....


7

Best way to add Authorization to a Custom Action button in SharePoint Designer is to add the required rights access in the "Rights mask:". For a list of available Rights Mask that you can use see: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx.


6

I finally found how all the things is working. First, there is a server control SocialNavigationControl. This control is rendered within SocialData.ascx. There is also a delegate control override in SocialDelegateControl.xml file of SocialRibbonControl feature. This override applies to GlobalSiteLink2 delegate control. Finally, the v4.master page ...


6

I've made some research on the subject of RegistrationId and RegistrationType according to declarative Ribbon customization. All my findings can be found here: RegistrationType & RegistrationId in SharePoint 2010 declarative Ribbon customizations As a short summary: You can use all four registration types to target some content for Ribbon customization....


5

First of all there is no document set library in SharePoint. There is only a content type that is called "Document Set" and this can exists on certain document libraries. You need in to use in your declaration the RegistrationType="ContentType" and for the RegistrationId="0x0120D520". Last one is the id of the content Type "Document Set". The required ...


5

it took me 2 days, but I figured it out. It turned out quite simple: Everything with the code was ok. The problem is that the feature had to be activated by default in the Administrative Web site(the feature was scoped as Web). If you have a problem like this, you just add the following code to the Feature Manifest as a Feature attribute: ...


5

Solution in 1 line: EnabledScript="javascript:SP.ListOperation.Selection.getSelectedItems().length > 0;"


5

You mean like using a link? Such as this one: {Site URL}/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={List GUID}&View={View GUID}&CacheControl=1 from the post Create Link to Export Library Contents to Excel


4

You can use EnabledScript parameter in CommandUIHandler, where you can put javascript code and check if specific page/list/view is loaded. Example: <CommandUIHandler Command="Ribbon.ListItem.CustomGroup.Controls.BtnSayHello.Command" CommandAction="javascript:alert('Hello');" EnabledScript="javascript: function isEnable(){ if(location....


4

For security reasons, you cannot access the web.config settings from javascript so the best approach would probably be to write a custom control / web part that can read the setting and then write it into the page into a script block.


4

I think you are almost there except that you have used assignment operator which will always return TRUE. Instead you have to use comparison '==' or '===' operators. update in below line EnabledScript="javascript:SP.ListOperation.Selection.getSelectedItems().length === 1;"


4

Open site in SharePoint Designer From left navigation choose Lists and Libraries Open the list in question Now from right pane - Look under "Custom Actions" Select the action to delete Use Ribbon "Delete" button OR press Delete key


4

You could delete the specified UserCustomAction by Sequence property as demonstrated below: function deleteCustomAction(sequenceNo,success,error) { var ctx = new SP.ClientContext(); var site = ctx.get_web(); var userCustomActions = site.get_userCustomActions(); ctx.load(userCustomActions); ctx.executeQueryAsync(function(){ ...


4

According to Update on Modern Document Libraries and Extensibility they should work. We’ve already made some good progress here. Theming, global navigation links, and URL-based custom actions that extend the ribbon and context menus are already supported in the modern document library experience. This ensures that customers and partners taking ...


3

To limit the Custom action to a specific type of list you need to specify RegistrationType and RegistrationId like this: <!-- Microsoft.SharePoint.StandardMenu : ActionsMenu : Site Actions menu of document library --> <CustomAction Id="CustomWareCustomActions.Microsoft.SharePoint.StandardMenu.CustomList.ActionsMenu" RegistrationType="List" ...


3

Everything works fine, I've even created a test project for you: http://www.4shared.com/zip/EwqRtH6c/ScriptLinkTest.html. Look at it. Did you check your js file is loaded correctly on the page?


3

Using {SiteUrl} token is nice, thanks to Alex Boev. Just to mention an alternative, you can use SharePoint javascript API to get the web url. In your example you want to open an application page (from layouts folder). There is a helper function for doing that getLayoutsPageUrl: SP.Utilities.Utility.getLayoutsPageUrl('myPath/EditWebInfo.aspx') So your ...


3

SharePoint 2010 ribbon doesn't have anything in common with 2007's DisplayFormToolBar. The custom action Location attribute should be set to "CommandUI.Ribbon" for adding something to ribbon. Then, you should provide special XML for button. Since SP2010 ribbon is a client-side thing, no C# code is involved here. You can find a simple example of adding a ...


3

AFAIK the "i like it" controls are not part of the ribbon? If you want to replace the controls, you can create a custom control that inherits from SocialNotificationBase and render your own content in the OnLoad control public class ReitanSocialNotification : SocialNotificationBase { public ReitanSocialNotification() { base....


3

Ok I found the solution with this modified xml I did achieve expected results: <CustomAction Id="Ribbon.ListItem.TagsAndNotes.NewLike" Location="CommandUI.Ribbon" Title="New version of I Like It"> <CommandUIExtension> <CommandUIDefinitions> <CommandUIDefinition ...


3

No need to do an async call SP.ListOperation.Selection.getSelectedItems(ctx) should get you all the selected items on the page. var ctx = SP.ClientContext.get_current(); var items = SP.ListOperation.Selection.getSelectedItems(ctx); for (var i in items) { //Do something }


3

Are you deploying it as a Site scope feature? If it's a Web scope feature then you have to activate it on the relevant subsites. For any customizations with Ribbon, make sure to clear the browser's cache to see the changes.


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

This can be done by creating a CustomAction. Specify Location="CommandUI.Ribbon.DisplayForm" in order to place a button in Display form. Here is an example: <CustomAction Id="ExportVersionHistory.DisplayForm" RegistrationType="ContentType" RegistrationId="0x01" Location="CommandUI.Ribbon.DisplayForm" Rights="ViewListItems"> ...


3

Please follow the following approach. Create a Sandbox solution rather then creating the SharePoint App Deploy your solution to your SharePoint Online Solution Gallery Activate your solution Activate the feature of your newly activated solution I know this is not the ultimate solution but this solution worked at my end. Let me know whether it helped you ...


3

I am no exeprt yet, but spent the last days on CustomActions and REST because the New Library View has nothing SharePoint left but CustomActions (and no JSOM on the page it for creating/changing them) There are two types of CustomActions/Scriptlinks involved here: Type 2 = Site(Collection) Executes on every page inside the SiteCollection /_api/site/...


3

You must not just copy/paste the code from my blog, but you must customize it for your case. This code is for this example so you have to adapt it to you. I think it should result with something like: function deleteUserCustomAction() { this.clientContext = new SP.ClientContext(siteUrl); var oWebsite = clientContext.get_web(); this....


3

I have created a test custom action using SharePoint designer with below Navigate to URL option javascript:(function() {var items = SP.ListOperation.Selection.getSelectedItems(); window.location.href= "http://www.google.com";})() It is opening in the same tab.


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