Partajați prin


GetCampaign Method

Retrieves an existing Campaign, as identified by the Campaign's unique identifier.

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

Syntax

'Declaration
Public Function GetCampaign ( _
    campaignId As Integer _
) As Campaign
'Usage
Dim instance As CampaignManager
Dim campaignId As Integer
Dim returnValue As Campaign

returnValue = instance.GetCampaign(campaignId)
public Campaign GetCampaign(
    int campaignId
)
public:
Campaign^ GetCampaign(
    int campaignId
)
public function GetCampaign(
    campaignId : int
) : Campaign

Parameters

  • campaignId
    Type: System..::.Int32
    The Id of the campaign to retrieve. Must not be less than 1.

Return Value

Type: Microsoft.CommerceServer.Marketing..::.Campaign
The Campaign associated with the campaignId, retrieved from the database.

Exceptions

Exception Condition
ArgumentOutOfRangeException

CampaignId is less than 1.

EntityDoesNotExistException

The requested campaign does not exist.

Remarks

Use this method to retrieve a specific Campaign object from the database.

Permissions

See Also

Reference

CampaignManager Class

CampaignManager Members

Microsoft.CommerceServer.Marketing Namespace