Share via


RestoreCampaign Method

Restores a deleted Campaign, associates it with the specified Customer, 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 RestoreCampaign ( _
    campaignId As Integer, _
    newParentCustomerId As Integer, _
    newCampaignName As String _
)
'Usage
Dim instance As MarketingWebService
Dim campaignId As Integer
Dim newParentCustomerId As Integer
Dim newCampaignName As String

instance.RestoreCampaign(campaignId, _
    newParentCustomerId, newCampaignName)
[WebMethodAttribute]
public virtual void RestoreCampaign(
    int campaignId,
    int newParentCustomerId,
    string newCampaignName
)
[WebMethodAttribute]
public:
virtual void RestoreCampaign(
    int campaignId, 
    int newParentCustomerId, 
    String^ newCampaignName
)
public function RestoreCampaign(
    campaignId : int, 
    newParentCustomerId : int, 
    newCampaignName : String
)

Parameters

  • campaignId
    Type: System..::.Int32
    The identifier of the Campaign to be restored.
  • newParentCustomerId
    Type: System..::.Int32
    The name to be given to the restored Campaign.

Exceptions

Exception Condition
ArgumentOutOfRangeException

campaignId or newParentCustomerId 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 the newCampaignName name already exists.

EntityStateException

The campaignId has not been deleted.

EntityDoesNotExistException

No Campaign exists with this campaignId, or no Customer exists with this Id.

ParentEntityDeletedException

The newParentCustomerId customer has been deleted.

ParentEntityDoesNotExistException

The newParentCustomerId customer does not exist.

DatabaseIntegrityException

A serious integrity issue with the database exists.

Remarks

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

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace