Share via


RemoveItemCampaignActivity Message

banner art

Removes an item from a campaign activity.

The relevant classes are specified in the following table.

Type Class
Request RemoveItemCampaignActivityRequest
Response RemoveItemCampaignActivityResponse
Entity campaignactivity

Remarks

To perform this action, the caller must have access rights on the campaign activity entity instance. For a list of required privileges, see RemoveItemCampaignActivity Privileges.

Example

The following code example shows how to use the RemoveItemCampaignActivity message.

[C#]
// Set up the CRM Service.
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the request object.
RemoveItemCampaignActivityRequest remove = new RemoveItemCampaignActivityRequest();

// Set the ID of the campaign activity to remove.
remove.CampaignActivityId = new Guid("2B951FBC-1C56-4430-B23B-20A1349068F3");

// Execute the request.
RemoveItemCampaignActivityResponse removed = (RemoveItemCampaignActivityResponse) service.Execute(remove);

[Visual Basic .NET]
' Set up the CRM Service.
Dim service As New CrmService()
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Create the Request Object
Dim remove As RemoveItemCampaignActivityRequest()

' Set the ID of the campaign activity to remove.
remove.SalesLiteratureItemId = New Guid("2B951FBC-1C56-4430-B23B-20A1349068F3")

' Execute the request.
Dim removed As RemoveItemCampaignActivityResponse = CType(service.Execute(remove), RemoveItemCampaignActivityResponse)

Related Topics

CrmService Messages

© 2007 Microsoft Corporation. All rights reserved.