4

I need to add a new Custom Actions Group to Site Settings page and inside this group a new custom link.

On the click of this custom link the user should be redirected to the Provider Hosted App that I have created.

Is this achievable in O365? If Yes, then how can this be implemented?

Please refer the screen shot below to understand where I want to add the new group and link. I hope that will make my question clear.

enter image description here

  • 1
    Is your question regarding how to add a Custom Group to site collection via a provider hosted app. Please clarify. – bkk Jun 23 '16 at 4:13
  • Yes. Is it possible to do so? – Mancy Desaee Jun 23 '16 at 4:27
  • Please see my updated answer – bkk Jun 23 '16 at 5:10
4

Try using this code for adding custom action to the site settings page.

// Add site settings link
UserCustomAction siteSettingLink = clientContext.Web.UserCustomActions.Add();
siteSettingLink.Group = "SiteTasks";
siteSettingLink.Location = "Microsoft.SharePoint.SiteSettings";
siteSettingLink.Name = "Sample_CustomSiteSetting";
siteSettingLink.Sequence = 1000;
siteSettingLink.Url = string.Format(DeployManager.appUrl, clientContext.Url);
siteSettingLink.Title = "Modify Site Metadata";
siteSettingLink.Update();
clientContext.ExecuteQuery();

And to add site actions link

//Add site actions link
UserCustomAction siteAction = clientContext.Web.UserCustomActions.Add();
siteAction.Group = "SiteActions";
siteAction.Location = "Microsoft.SharePoint.StandardMenu";
siteAction.Name = "Sample_CustomAction";
siteAction.Sequence = 1000;
siteAction.Url = string.Format(DeployManager.appUrl, clientContext.Url); ;
siteAction.Title = "Modify Site Metadata";
siteAction.Update();
clientContext.ExecuteQuery();
  • 1
    Now I get what you asked, obviously I answered based on the previous question. please use proper terms for getting answers easily. – bkk Jun 23 '16 at 5:03
  • Can you please share the reference link for this? It would be useful. – Mancy Desaee Jun 23 '16 at 8:43
  • 1
    Thanks for this. it works great. Can you please help on how can I create new Custom Action Group to add the link? – Mancy Desaee Jun 23 '16 at 11:28

Your Answer

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

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