Share via


SPUserCustomAction.Delete method (Int32, Int32)

Deletes the custom action and returns the number of actions remaining for the current and parent scope.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Protected Sub Delete ( _
    <OutAttribute> ByRef scopeRecordsRemaining As Integer, _
    <OutAttribute> ByRef parentScopeRecordsRemaining As Integer _
)
'Usage
Dim scopeRecordsRemaining As Integer
Dim parentScopeRecordsRemaining As Integer

Me.Delete(scopeRecordsRemaining, _
    parentScopeRecordsRemaining)
protected void Delete(
    out int scopeRecordsRemaining,
    out int parentScopeRecordsRemaining
)

Parameters

  • scopeRecordsRemaining
    Type: System.Int32

    When this method returns, contains the number of records remaining in the database for this scope after this custom action is deleted. This parameter is passed uninitialized.

  • parentScopeRecordsRemaining
    Type: System.Int32

    When this method returns, contains the number of records remaining in the database for the parent scope after this custom action is deleted. This parameter is passed uninitialized.

Exceptions

Exception Condition
UnauthorizedAccessException

The user does not have permissions to delete the custom action.

SPException

The changes conflict with those made concurrently by another user.

-or-

The custom action could not be deleted.

Remarks

This method deletes the custom action and returns the number of actions remaining for the current and parent scope. If either scopeRecordsRemaining or parentScopeRecordsRemaining is negative, the deletion did not occur.

See also

Reference

SPUserCustomAction class

SPUserCustomAction members

Delete overload

Microsoft.SharePoint namespace