1

I am developing a Custom Menu Item Action using provider hosted app for copying documents across sites collection for each listitem of Document Library Type. I need to enable the same custom action to all document libraries in the subsites also. what are possible values for RegistrationType and RegistrationId to achieve my requirement . Below is my Element.xml file.

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
 <CustomAction Id="eb90b079-9d4a-4242-981c-020fc653587d.MenuItemCustomAction1"
            RegistrationType="List"
            RegistrationId="101"
            Location="EditControlBlock"
            Sequence="10001"
            Title="SendDocument"
           >    
<UrlAction Url="https://tarunproviderhostedapp.azurewebsites.net/Pages/Default.aspx?{StandardTokens}&amp;SPListItemId={ItemId}&amp;SPListId={ListId}" />

Can Anyone suggest best approach to meet my requirement Thanks in Advance..

2 Answers 2

0

You can try custom action with content type. example you can replace your RegistrationType="Content Type" and RegistrationId="XYZ". So all list created with the content type will be having the custom action enabled. You can also refer link for custom action on content type.

2
  • I had tried you solution but it was creating the custom action for that particular site collection libraries only. Sub site Doc libraries are not effecting..
    – TARUN
    Feb 14, 2017 at 12:20
  • It is because every site has its own content type.
    – Sunil Sahu
    Feb 14, 2017 at 16:29
0

I Achieved the requirement using the App Stapling.

The following articles for reference:

SharePoint 2013 App Deployment through "App Stapling"

Automating add-in/app installation to SharePoint sites using CSOM

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.