Udostępnij za pośrednictwem


Restore Method (Int32, Int32, String)

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

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, _
    newCampaignName As String _
)
'Usage
Dim instance As CampaignManager
Dim campaignId As Integer
Dim newParentCustomerId As Integer
Dim newCampaignName As String

instance.Restore(campaignId, newParentCustomerId, _
    newCampaignName)
public void Restore(
    int campaignId,
    int newParentCustomerId,
    string newCampaignName
)
public:
void Restore(
    int campaignId, 
    int newParentCustomerId, 
    String^ newCampaignName
)
public function Restore(
    campaignId : int, 
    newParentCustomerId : int, 
    newCampaignName : String
)

Parameters

  • newParentCustomerId
    Type: System..::.Int32
    The Id of the Customer to associate with.
  • newCampaignName
    Type: System..::.String
    The new campaign name after restore operation.

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.

StringLengthValidationException

The new Campaign name provided is not within the range of valid lengths.

PropertyNullValidationException

The new Campaign name provided is nullNothingnullptra null reference (Nothing in Visual Basic).

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