Share via


Activate Method

Activates a specified Campaign.

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

Syntax

'Declaration
Public Sub Activate ( _
    campaignId As Integer, _
    timestamp As DateTime _
)
'Usage
Dim instance As CampaignManager
Dim campaignId As Integer
Dim timestamp As DateTime

instance.Activate(campaignId, timestamp)
public void Activate(
    int campaignId,
    DateTime timestamp
)
public:
void Activate(
    int campaignId, 
    DateTime timestamp
)
public function Activate(
    campaignId : int, 
    timestamp : DateTime
)

Parameters

  • campaignId
    Type: System..::.Int32
    The Id of the campaign to be activated. May not be zero or less.
  • timestamp
    Type: System..::.DateTime
    The LastModifiedDate timestamp of the item to be Activated. If the time stamp does not match the information in the database, it indicates the race condition.

Exceptions

Exception Condition
ArgumentOutOfRangeException

campaignId is less than or equal to zero.

EntityStateException

The specified campaign has been deleted or already activated.

EntityDoesNotExistException

The specified campaign does not exist.

Remarks

Activate is used as the approval mechanism, so Activate/Deactivate methods require higher privilege than authors have. The Active status of a Campaign can also be changed by setting the Active property of a Campaign.

Permissions

See Also

Reference

CampaignManager Class

CampaignManager Members

Microsoft.CommerceServer.Marketing Namespace