Deactivate Method
Deactivates a specified Campaign.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Sub Deactivate ( _
campaignId As Integer _
)
'Usage
Dim instance As CampaignManager
Dim campaignId As Integer
instance.Deactivate(campaignId)
public void Deactivate(
int campaignId
)
public:
void Deactivate(
int campaignId
)
public function Deactivate(
campaignId : int
)
Parameters
- campaignId
Type: System..::.Int32
The Id of the Campaign to be deactivated.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | campaignId is less than or equal to zero. |
EntityStateException | The specified campaign has been deleted or is already deactivated. |
EntityDoesNotExistException | The specified campaign does not exist. |
Remarks
Deactivate is intended to be called by privileged users only. It can be used to immediately deactivate a Campaign without requiring the change to go through an approval process. Less privileged users cannot modify the campaign status once is set to active.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.