Devuelve el número de elementos de la recopilación. Obtiene el número de campos de tipo AttachmentField, ninguno o varios. Esta propiedad es de sólo lectura.
VBScript
collection.Count
Perl
$collection->Count();
VBScript
set attachFields = entity.AttachmentFields numFields = attachFields.Count For x = 0 to numFields - 1 set oneField = attachFields.Item x ' ... Next
Perl
# Get the list of attachment fields $attachfields = $entity->GetAttachmentFields() # Find out how many attachment fields there # are so the for loop can iterate them $numfields = $attachfields->Count(); for ($x = 0; $x < $numfields ; $x++) { # Get each attachment field $onefield = $attachfields->Item($x); # ...do some work with $onefield }