Share via


RestoreCustomer Method

Restores a deleted Customer record, based upon its unique identifier, and gives it a new name.

Namespace:  Microsoft.CommerceServer.Marketing.WebService
Assembly:  Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Overridable Sub RestoreCustomer ( _
    customerId As Integer, _
    newCustomerName As String _
)
'Usage
Dim instance As MarketingWebService
Dim customerId As Integer
Dim newCustomerName As String

instance.RestoreCustomer(customerId, _
    newCustomerName)
[WebMethodAttribute]
public virtual void RestoreCustomer(
    int customerId,
    string newCustomerName
)
[WebMethodAttribute]
public:
virtual void RestoreCustomer(
    int customerId, 
    String^ newCustomerName
)
public function RestoreCustomer(
    customerId : int, 
    newCustomerName : String
)

Parameters

  • customerId
    Type: System..::.Int32
    The identifier of the customer to be restored.

Exceptions

Exception Condition
ArgumentOutOfRangeException

customerId is less than zero.

NotAuthorizedException

The user is not authorized to perform the requested operation.

ArgumentNullException

An input argument or one of the required properties is nullNothingnullptra null reference (Nothing in Visual Basic).

StringLengthValidationException

One if the property values is too long or too short.

DuplicateEntityNameException

An entity with this name already exists.

EntityStateException

The customer has not been deleted.

EntityDoesNotExistException

No customer exists with this Id.

DatabaseIntegrityException

A serious integrity issue with the database exists.

Remarks

Deleting a Customer does not actually remove the customer record from the database. These records are not permanently removed until the PurgeDeletedCustomers method is called to purge them from the database. This method allows you to restore the record before it is permanently deleted.

Permissions

See Also

Reference

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace