RemoveBinaryDataActivityMimeAttachment Message

banner art

Removes the attachment from the specified activity MIME attachment (e-mail attachment) instance.

The relevant classes are specified in the following table.

Type Class
Request RemoveBinaryDataActivityMimeAttachmentRequest
Response RemoveBinaryDataActivityMimeAttachmentResponse
Entity activitymimeattachment

Remarks

To perform this action, the caller must have access rights on the activity MIME attachment (e-mail attachment) entity instance. For a list of required privileges, see RemoveBinaryDataActivityMimeAttachment Privileges.

Example

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

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

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

// Set the ID of the attachment to have its datafile link.
remove.ActivityMimeAttachmentId = attachmentId;

// Execute the request.
RemoveBinaryDataActivityMimeAttachmentResponse removed = (RemoveBinaryDataActivityMimeAttachmentResponse) 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 New RemoveBinaryDataActivityMimeAttachmentRequest()

' Set the ID of the attachment to have its datafile link.
remove.ActivityMimeAttachmentId = attachmentId

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

Related Topics

CrmService Messages

© 2007 Microsoft Corporation. All rights reserved.