SPUserCustomAction.Delete Method

Deletes the custom action.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallableExceptionConstraintAttribute(Condition := "User does not have permissions to delete the UserCustomAction.",  _
    ErrorType := GetType(UnauthorizedAccessException), FixedId := "accessdenied")> _
<ClientCallableExceptionConstraintAttribute(Condition := "Unable to delete the user custom action.",  _
    ErrorType := GetType(SPException), FixedId := "b", ErrorCode := )> _
<ClientCallableMethodAttribute(Name := "DeleteObject", RemoveThisObjectFromParentCollection := True)> _
<ClientCallableExceptionConstraintAttribute(Condition := "Save Conflict. Your changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes.",  _
    ErrorType := GetType(SPException), FixedId := "saveconflict",  _
    ErrorCode := )> _
Public Overridable Sub Delete
'Usage
Dim instance As SPUserCustomAction

instance.Delete()
[ClientCallableExceptionConstraintAttribute(Condition = "User does not have permissions to delete the UserCustomAction.", 
    ErrorType = typeof(UnauthorizedAccessException), FixedId = "accessdenied")]
[ClientCallableExceptionConstraintAttribute(Condition = "Unable to delete the user custom action.", 
    ErrorType = typeof(SPException), FixedId = "b", ErrorCode = )]
[ClientCallableMethodAttribute(Name = "DeleteObject", RemoveThisObjectFromParentCollection = true)]
[ClientCallableExceptionConstraintAttribute(Condition = "Save Conflict. Your changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes.", 
    ErrorType = typeof(SPException), FixedId = "saveconflict", 
    ErrorCode = )]
public virtual void Delete()

See Also

Reference

SPUserCustomAction Class

SPUserCustomAction Members

Delete Overload

Microsoft.SharePoint Namespace