Udostępnij za pośrednictwem


NewCampaign Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Creates a new Campaign object with default values.

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

Syntax

'Declaration
Public Function NewCampaign ( _
    customerId As Integer _
) As Campaign
'Usage
Dim instance As CampaignManager
Dim customerId As Integer
Dim returnValue As Campaign

returnValue = instance.NewCampaign(customerId)
public Campaign NewCampaign(
    int customerId
)
public:
Campaign^ NewCampaign(
    int customerId
)
public function NewCampaign(
    customerId : int
) : Campaign

Parameters

  • customerId
    Type: System..::.Int32
    The Id of the customer in which this Campaign is to be created. May not be zero or less.

Return Value

Type: Microsoft.CommerceServer.Marketing..::.Campaign
The newly created Campaign.

Exceptions

Exception Condition
ParentEntityDeletedException

The specified customerId refers to a deleted customer object.

ParentEntityDoesNotExistException

The specified customerId does not refer to an existing Customer object.

ArgumentOutOfRangeException

CustomerId must be greater than zero.

Remarks

The Campaign does not exist in the database until Save is called on the Campaign object.

Permissions

See Also

Reference

CampaignManager Class

CampaignManager Members

Microsoft.CommerceServer.Marketing Namespace