Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- 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.