Tag Info

Hot answers tagged

12

You can associate your custom action to a specific list by using the RegistrationId property. Example: <CustomAction ControlAssembly="MagicalProject.Actions" ControlClass="MagicalProject.Actions" ControlSrc="/_layouts/MagicalSite/MagicalPage.aspx" Description="This is my custom action which does magical ...


11

You can use one of the following methods: SP.UI.ModalDialog.showWaitScreenSize or SP.UI.ModalDialog.showWaitScreenWithNoClose. Example: waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose("Loading...", "Please wait while data is retrieved...", 60, 280); --------wait for something-------- waitDialog.close(SP.UI.DialogResult.OK); Check out all ...


6

Ribbon buttons cannot be hidden using HideCustomAction, at all. At least, I've tried this and it doesn't work. You should use CustomAction for this purpose, with empty CommandUIDefinition elements, like this: <CustomAction Id="RemoveRibbonButton" Location="CommandUI.Ribbon" > <CommandUIExtension> <CommandUIDefinitions> ...


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

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)) ...


5

You can reference an external js file like: <CustomAction Id="Ribbon.Library.Actions.Scripts" Location ="ScriptLink" ScriptSrc="/_layouts/DocumentTabTwo/Button2.js" /> This will ensure the functions from the file are accessible from your CommandUIHandler


4

Just hook it to the 0x01 Content Type. An example of the syntax used in our SharePoint Audit suite is as follows: <!-- Add a new action to the SharePoint 2010 Ribbon bar for each list to show all audit entries for a list Item --> <CustomAction Id="Muhimbi.SharePoint.Audit.Ribbon.ListItem.Share.ViewAuditLog.Action" Location="CommandUI.Ribbon" ...


4

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 ...


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

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 ...


3

This is XML to hide ManageWorkflows button. <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="RemoveRibbonButton" Location="CommandUI.Ribbon"> <CommandUIExtension> <CommandUIDefinitions> <CommandUIDefinition ...


3

There are many example of this on the Internet. Here is one of them: SPD 2010 Custom Workflow Activity


3

This is quite common when first developing an Action. Some things to check: Restart SharePoint Designer and IIS. Clear the SharePoint Designer Workflow Assembly Cache. Double check the strong name in the AuthorizedType element (use reflector to get the full signature of the Assembly). Check the syntax in your Actions file. It is my experience that if you ...


3

This was tough when I started doing it today. It is possible via feature using a CustomAction element in the elements.xml and some code. I tried a no-code solution but it was not possible. <CustomAction Id="HideCreateSiteInSiteActions" Location="Microsoft.SharePoint.StandardMenu" GroupId="SiteActions" Sequence="901" ...


3

I realize that Location and GroupID attributes mentioned in SDk are not correct: http://msdn.microsoft.com/en-us/library/bb802730.aspx The values you specified are correct. I was able to display a link with following XML, which is pretty similar to yours: <?xml version="1.0" encoding="utf-8"?> <Elements ...


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

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

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

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() { ...


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" ...


2

There's no Ribbon in the Timer Job config area, so that's not an option. Also, you can't add any custom actions to JobEdit.aspx easily either, so that's out the question, too. What I would do (and have done before), is add your custom action to the place you already can do, and in your config page have a dropdown box that populates with all instances of ...


2

The intention of HideCustomAction is to permanently hide the custom action, not to hide it conditionally, so you cannot link those two out of the box. The custom action can hide itself based on two attributes of CustomAction element: Rights and RequireSiteAdministrator as documented here: http://msdn.microsoft.com/en-us/library/ms460194.aspx OUt of the box, ...


2

It's far from the most elegant thing I've done, but it'll work for now. The seed of the idea comes from this blog entry. To make it work, I used a Content Editor webpart containing this jQuery snippet: <script type="text/javascript"> $(document).ready(function(index){ $("[text*='My Custom Action Text']").each(function() { ...


2

If it is showing up in the list of activities, and by selecting it, nothing happens, in my experience, an exception is being caught somewhere, and probably logged. So try selecting it, and go right to the SharePoint logs. Another idea, is that SharePoint designer is finicky and I haven't been able to determine when things are/are not cached. Have you tried ...


2

I followed this link and managed to get this demo working: https://msmvps.com/blogs/sundar_narasiman/archive/2010/12/26/develop-custom-workflow-activity-for-sharepoint-2010-workflow.aspx Rather than manually copying everything to where it should be I used Visual Studio Deploy to install everything, and the extra project to hold the actions file in the ...


2

Check for the sequence number...


2

I'm not sure but it can be because of settings of ListViewWebpart on your page. If the toolbar in this webpart settings is set to Summary mode the Ribbon customizations for the underlying list will not be displayed on page. You need to set it to Full mode.



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