Share via


Delete Method

Deletes an existing Campaign Record.

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

Syntax

'Declaration
Public Sub Delete ( _
    campaignId As Integer _
)
'Usage
Dim instance As CampaignManager
Dim campaignId As Integer

instance.Delete(campaignId)
public void Delete(
    int campaignId
)
public:
void Delete(
    int campaignId
)
public function Delete(
    campaignId : int
)

Parameters

Exceptions

Exception Condition
ArgumentOutOfRangeException

campaignId is less than or equal to zero.

EntityStateException

The specified campaign has already been deleted.

EntityDoesNotExistException

The specified campaign does not exist.

EntityHasChildrenException

The specified campaign contains campaign items.

Remarks

Deleting a Campaign does not actually remove the campaign record from the database. These records are not permanently removed until they are purged from the database. Deleting a Campaign will also delete all campaign items associated with the Campaign. Deleting a Campaign will remove the campaign-to-customer association.

Permissions

See Also

Reference

CampaignManager Class

CampaignManager Members

Microsoft.CommerceServer.Marketing Namespace