Tag Info

Hot answers tagged

10

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


10

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

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


3

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


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

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

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

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 }


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

Actually, all you need is to read intently the following MSDN topic: http://msdn.microsoft.com/en-us/library/ms458635.aspx You can see now, that besides of {ListId} token, you can also use the {SiteUrl} token, which will point to the URL of the current web: {SiteUrl} - URL of the Web site (SPWeb). And SPWeb object can be retrieved easily by its ...


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

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


2

I think you can wrap it in function declared in you file: function MyFunction() { alert('Hello World!'); } And then call it in the same way: CommandAction="javascript:MyFunction();" As for JS file you can add it to Layouts folder and create a delegate control to render link to this file in the page. You can deploy such delegate control in the same ...


2

The L_Menu_BaseUrl variable is what you are looking for. SharePoint stores the current web url in it. Have a look here: http://vrdmn.blogspot.in/2011/08/javascript-lmenubaseurl-varaible-for.html Also some additional info on other OOB JavaScript Objects: _spPageContextInfo.webServerRelativeUrl will also give you the current web url. ...


2

I wouldn't necessarilly rely on <appSettings> in SharePoint applications, mostly for things that are going to appear on the UI, or that should be easily configurable within the application. Instead, would use some kind of Configuration Store approach, where you save the Key/Value setting in a List within SharePoint UI (such as SiteConfiguration). ...


2

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


2

Not in then xml, but when you create ribbon buttons you specify javascript to execute when clicked. You then have two options: Use Client Object Model in this javascript to retrieve the property and do the navigation Navigate to a trampolin page which reads the property and redirects


2

One approach I would like you to try, Configure Incoming email settings on a SharePoint library. There are many articles in the web, like this which explains the same. Once you start receiving emails directly to SharePoint library, you can use the SPEmailEventReceiver class which fires when an email is received in a list and then you can initiate a ...



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