Udostępnij za pośrednictwem


DeleteProfile Method

Deletes a profile instance from the server.

Namespace:  Microsoft.CommerceServer.Profiles
Assembly:  Microsoft.CommerceServer.Profiles.CrossTierTypes (in Microsoft.CommerceServer.Profiles.CrossTierTypes.dll)

Syntax

'Declaration
Public Function DeleteProfile ( _
    primaryKeyValue As String, _
    profileType As String _
) As ProfileOperationResponse
'Usage
Dim instance As ProfileManagementContext
Dim primaryKeyValue As String
Dim profileType As String
Dim returnValue As ProfileOperationResponse

returnValue = instance.DeleteProfile(primaryKeyValue, _
    profileType)
public ProfileOperationResponse DeleteProfile(
    string primaryKeyValue,
    string profileType
)
public:
ProfileOperationResponse^ DeleteProfile(
    String^ primaryKeyValue, 
    String^ profileType
)
public function DeleteProfile(
    primaryKeyValue : String, 
    profileType : String
) : ProfileOperationResponse

Parameters

  • primaryKeyValue
    Type: System..::.String
    The value of the primary key property of the profile instance to delete.
  • profileType
    Type: System..::.String
    The type of profile to delete (i.e. UserObject, Address).

Return Value

Type: Microsoft.CommerceServer.Profiles..::.ProfileOperationResponse
A ProfileOperationResponse object describing the profile that was deleted.

Exceptions

Exception Condition
ArgumentNullException

Any of the parameters provided is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentException

The key value provided is not the correct type.

AuthenticationException

User has not been authenticated.

NotAuthorizedException

User is not authorized to perform this task.

DefinitionDoesNotExistException

The profile definition named in the profileType does not exist.

ProfileDoesNotExistException

No profile exists with the provided key value.

Remarks

Deletes a ProfileOperationResponse object from the server.

Permissions

See Also

Reference

ProfileManagementContext Class

ProfileManagementContext Members

Microsoft.CommerceServer.Profiles Namespace