/// <summary> /// Removes a custom action from a web /// </summary> /// <param name="web">The SharePoint web</param> /// <param name="actionName">The ID for the custom action</param> public static void DeleteCustomAction(this SPWeb web, string actionName) { Guid customActionId = GetCustomActionIdForName(web, actionName); if (customActionId != default(Guid)) { SPUserCustomAction customAction = web.UserCustomActions[customActionId]; customAction.Delete(); web.Update(); } }
public void Delete() { m_userCustomAction.Delete(); }