NewCampaignItem Method

Creates a new CampaignItem under a specified Campaign.

Namespace:  Microsoft.CommerceServer.Marketing.WebService
Assembly:  Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Overridable Function NewCampaignItem ( _
    campaignItemType As CampaignItemType, _
    parentCampaignId As Integer _
) As CampaignItemData
'Usage
Dim instance As MarketingWebService
Dim campaignItemType As CampaignItemType
Dim parentCampaignId As Integer
Dim returnValue As CampaignItemData

returnValue = instance.NewCampaignItem(campaignItemType, _
    parentCampaignId)
[WebMethodAttribute]
public virtual CampaignItemData NewCampaignItem(
    CampaignItemType campaignItemType,
    int parentCampaignId
)
[WebMethodAttribute]
public:
virtual CampaignItemData^ NewCampaignItem(
    CampaignItemType campaignItemType, 
    int parentCampaignId
)
public function NewCampaignItem(
    campaignItemType : CampaignItemType, 
    parentCampaignId : int
) : CampaignItemData

Parameters

  • parentCampaignId
    Type: System..::.Int32
    The parent campaign under which the campaign item is to be created.

Return Value

Type: CampaignItemData
The newly created CampaignItemData instance associated with parentCampaignId.

Exceptions

Exception Condition
ArgumentOutOfRangeException

parentCustomerId or parentCampaignId is less than zero.

NotAuthorizedException

The user is not authorized to perform the requested operation.

EntityStateException

The Campaign has been deleted.

EntityDoesNotExistException

No Campaign exists with this Id.

DatabaseIntegrityException

A serious integrity issue with the database exists.

Remarks

Creates a new campaign item under a specified campaign. Use this method to retrieve a specific CampaignItemData containing the CampaignItem object from the database.

Permissions

See Also

Reference

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace