Devuelve la recopilación de archivos de datos adjuntos del campo de archivo de datos adjuntos.
Es una propiedad de sólo lectura; el valor se puede visualizar, pero no establecer. No obstante, se pueden seguir añadiendo elementos (y eliminando elementos) de la recopilación utilizando métodos del objeto Attachments.
Esta propiedad siempre devuelve un objeto Attachments, aunque no haya archivos adjuntos asociados al campo. Si el campo no tiene archivos adjuntos, el método Count del objeto Attachments contiene el valor de cero.
VBScript
attachmentField.Attachments
Perl
$attachmentField->GetAttachments();
VBScript
' This example assumes there is at least 1 attachment field ' associated with the record. set currentSession = GetSession set attachFields = AttachmentFields set attachField1 = attachFields.Item(0) set theAttachments = attachField1.Attachments For each attachment in theAttachments 'Do something with each attachment Next
Perl
# This example assumes that there is at least 1 attachment # field associated with the record. Otherwise, # GetAttachmentFields won't return anything interesting and an # error would be generated # Get the collection of attachment fields $attachfields = $entity->GetAttachmentFields(); # Get the first attachment field $attachfield1 = $attachfields->Item(0) # Now get the collection of attachments from the attachments field $attachments = $attachfield1->GetAttachments(); # Retrieve the number of attachments for the for loop $numattachments = $attachments->Count(); for ($x = 0 ; $x < $numattachments ; $x++) { $attachment = $attachments->Item($x); # ...do some work with $attachment }