Restore Method (Int32)
Restores a deleted Customer record, based upon its unique identifier.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Sub Restore ( _
customerId As Integer _
)
'Usage
Dim instance As CustomerManager
Dim customerId As Integer
instance.Restore(customerId)
public void Restore(
int customerId
)
public:
void Restore(
int customerId
)
public function Restore(
customerId : int
)
Parameters
- customerId
Type: System..::.Int32
Id of the Customer to restore. Must be greater than zero.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | customerId was less than one. |
EntityDoesNotExistException | The requested customer record does not exist. |
EntityStateException | The Customer is not currently deleted. |
DuplicateEntityNameException | The restored Customer contains the name of an existing Customer. |
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.