I was looking for some guidance on Custom Actions. I will be really helpful if you someone help/guide me on this.
Consider a case where I have a SharePoint List with Key and Value pair as shown below.
Key : ShowHideCustomAction
Value : <ShowHideCustomAction>
<HideCustomActions>
<HideSiteSettingsRegion>
<LinkToHide Name="SiteCollectionFeature">
<GroupId> SiteCollectionAdmin </GroupId>
<HideActionId>ManageSiteCollectionFeatures</HideActionId>
<Location>Microsoft.SharePoint.SiteSettings</Location>
</LinkToHide>
</HideSiteSettingsRegion>
<HideSiteActionRegion>
<LinkToHide Name="SiteContent">
<GroupId> XYZ </GroupId>
<HideActionId>XYZ</HideActionId>
<Location>Microsoft.SharePoint.StandardMenu</Location>
</LinkToHide>
</HideSiteActionRegion>
</HideCustomActions>
</ShowHideCustomAction>
Generally what we do is; Add an element.xml in project, write HideCustomAction Tag with appropriate attribute and activate a feature which will hide a link on Site Action/Settings page. But going ahead what if we need to hide one more link ? We again need to add Tag and deploy the solution.
If we have something like this we can avoid the one additional deployment of a solution and can Unhide/Hide the SharePoint links as and when required with simple attribute addition in Config list.
Actually, I am stuck at the point where how can I bind my values from XML to Custom Action attributes like to GroupId, HideCustomId etc. etc.? And will that element.xml get updated on WFE (in case of multi-server farm) ? Will it get reflect automatically on all servers ? or Do I have to take an object of CustomAction on server side and then fill the attributes for the same ?
In advance, Thanks for your help. Looking forward to your reply. Thanks.