AttachmentFields

Description

Returns the AttachmentFields collection object containing this Entity object's attachment fields.

The AttachmentFields property is read-only; you cannot modify this field programmatically. However, after you retrieve an individual AttachmentField object, you can update its Attachments collection. In other words, within a field you can add or remove individual Attachment objects, but you cannot modify the field itself (or the collection of fields).

For an overview of attachments, see Attachments and Histories.

See also "Getting and setting attachment information".

Syntax

VBScript


entity.AttachmentFields 

Perl


$entity->GetAttachmentFields(); 
Identifier
Description
entity
An Entity object representing a user data record. Inside a hook, if you omit this part of the syntax, the Entity object corresponding to the current data record is assumed.
Return value
An AttachmentFields Object that contains all of the AttachmentField Objects currently associated with this Entity object.

Examples

VBScript


set fields = entity.AttachmentFields 
For Each fieldObj in fields
   ' Do something with each AttachmentField object 

   ' ... 
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

 }