Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Creates a copy of an existing CampaignItem.
Namespace: Microsoft.CommerceServer.Marketing.WebService
Assembly: Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)
Syntax
'Declaration
<WebMethodAttribute> _
Public Overridable Function CopyCampaignItem ( _
campaignItemId As Integer, _
newParentCampaignId As Integer _
) As CampaignItemData
'Usage
Dim instance As MarketingWebService
Dim campaignItemId As Integer
Dim newParentCampaignId As Integer
Dim returnValue As CampaignItemData
returnValue = instance.CopyCampaignItem(campaignItemId, _
newParentCampaignId)
[WebMethodAttribute]
public virtual CampaignItemData CopyCampaignItem(
int campaignItemId,
int newParentCampaignId
)
[WebMethodAttribute]
public:
virtual CampaignItemData^ CopyCampaignItem(
int campaignItemId,
int newParentCampaignId
)
public function CopyCampaignItem(
campaignItemId : int,
newParentCampaignId : int
) : CampaignItemData
Parameters
- campaignItemId
Type: System..::.Int32
The identifier of the source Campaign Item.
- newParentCampaignId
Type: System..::.Int32
The identifier of the Campaign under which the new campaign item is to be created.
Return Value
Type: CampaignItemData
The newly created CampaignItemData instance.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | Either campaignItemId or newParentCampaignId is less than zero. |
| NotAuthorizedException | The user is not authorized to perform the requested operation. |
| EntityDoesNotExistException | The Campaign Item does not exist, or the new Campaign does not exist. |
| EntityStateException | The Campaign Item has been deleted, or the new Campaign has been deleted. |
| DatabaseIntegrityException | A serious integrity issue with the database. |
Remarks
The new Campaign Item will not be saved at this time. To save the campaign item, call SaveCampaignItem.
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.