Udostępnij za pośrednictwem


Restore Method (Int32, Int32)

Restores a deleted Campaign, and associates it with the specified Customer.

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

Syntax

'Declaration
Public Sub Restore ( _
    campaignId As Integer, _
    newParentCustomerId As Integer _
)
'Usage
Dim instance As CampaignManager
Dim campaignId As Integer
Dim newParentCustomerId As Integer

instance.Restore(campaignId, newParentCustomerId)
public void Restore(
    int campaignId,
    int newParentCustomerId
)
public:
void Restore(
    int campaignId, 
    int newParentCustomerId
)
public function Restore(
    campaignId : int, 
    newParentCustomerId : int
)

Parameters

  • campaignId
    Type: System..::.Int32
    The Id of the campaign to be restored. May not be zero or less.
  • newParentCustomerId
    Type: System..::.Int32
    The Id of the Customer record that the deleted Campaign record should be reassociated with. When a Campaign is deleted it is no longer associated with any Customer.

Exceptions

Exception Condition
ArgumentOutOfRangeException

campaignId is less than or equal to zero.

DuplicateEntityNameException

newCustomerName refers to a duplicate entity name

EntityDoesNotExistException

campaignId refers to an entity that does not exist in the database.

ParentEntityDoesNotExistException

newParentCustomerId refers to a Customer that does not exist.

ParentEntityDeletedException

newParentCustomerId refers to a Customer that has been deleted.

EntityStateException

The specified campaign has not been deleted.

Remarks

Restoring a Campaign will also restore all campaign items that were associated with the Campaign at the time that it was deleted. A valid Customer must be provided when restoring a Campaign.

Deleting a Campaign does not actually remove the customer record from the database. These records are not permanently removed until the PurgeDeletedCampaigns 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

CampaignManager Class

CampaignManager Members

Restore Overload

Microsoft.CommerceServer.Marketing Namespace