RestoreCampaignItem Method

Restores a deleted CampaignItem, associates it with the specified Campaign record, 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 RestoreCampaignItem ( _
    campaignItemId As Integer, _
    newParentCampaignId As Integer, _
    newCampaignItemName As String _
)
'Usage
Dim instance As MarketingWebService
Dim campaignItemId As Integer
Dim newParentCampaignId As Integer
Dim newCampaignItemName As String

instance.RestoreCampaignItem(campaignItemId, _
    newParentCampaignId, newCampaignItemName)
[WebMethodAttribute]
public virtual void RestoreCampaignItem(
    int campaignItemId,
    int newParentCampaignId,
    string newCampaignItemName
)
[WebMethodAttribute]
public:
virtual void RestoreCampaignItem(
    int campaignItemId, 
    int newParentCampaignId, 
    String^ newCampaignItemName
)
public function RestoreCampaignItem(
    campaignItemId : int, 
    newParentCampaignId : int, 
    newCampaignItemName : String
)

Parameters

  • newParentCampaignId
    Type: System..::.Int32
    The new parent Campaign for this item.

Exceptions

Exception Condition
ArgumentOutOfRangeException

campaignItemId is less than zero.

NotAuthorizedException

The user is not authorized to perform the requested operation.

EntityDoesNotExistException

The Campaign Item does not exist.

EntityStateException

The Campaign Item is not deleted.

DuplicateEntityNameException

An entity with this name already exists.

ParentEntityDoesNotExistException

The new Campaign does not exist.

ParentEntityDeletedException

The new Campaign has been deleted.

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.

DatabaseIntegrityException

A serious integrity issue with the database exists.

Remarks

Deleting a CampaignItem does not actually remove the campaign item record from the database. These records are not permanently removed until the PurgeDeletedItems 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