I need to create a feature with Visual Studio that creates a custom List Action that does something. Per example, sends an e-mail, change the site name, etc.

To be more specific, I want to know how I can build a feature that enables a custom List Action that does something. It can be sending an e-mail, changing the site name, etc. I just want to know how to develop a feature that triggers a custom List Action.

I tried creating an empty sharepoint project, added a feature and placed a .xml item with the following code on it and it's not working yet. What am I doing wrong?

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="7ea30734-ad09-41a3-91cc-7f03cc76e2ec.MenuAction"
Update the Url below to the page you want the custom action to use.
Start the URL with the token ~remoteAppUrl if the page is in the
associated web project, use ~appWebUrl if page is in the app project.
<UrlAction Url="~appWebUrl/Pages/Default.aspx?{StandardTokens}&amp;SPListItemId={ItemId}&amp;SPListId={ListId}" />

I did just as I read here http://www.sharepoint-journey.com/custom-actions-in-sharepoint-2013.html but I couldn't make it work.

  • Is you feature that adds the custom action scoped to Web or Site? – Paul Strupeikis Jun 30 '16 at 10:49
  • @PaulStrupeikis Web. – ANDRÉ GONÇALVES Jun 30 '16 at 12:52
  • Try setting it to Site and then check again. Make sure there is a Safe Control Entry added to custom action. – Paul Strupeikis Jun 30 '16 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.