설명

설명

첨부 파일에 대한 설명을 설정하거나 리턴합니다. 이는 읽기/쓰기 특성으로서, 다른 Attachment 특성과 달리 해당 값을 설정할 수 있습니다.

구문

VBScript

attachment.Description 
attachment.Description description 

Perl

$attachment->GetDescription(); 
$attachment->SetDescription(description); 
ID
설명
attachment
파일을 레코드에 첨부함을 나타내는 Attachment 오브젝트.
description
설명 텍스트를 포함하는 문자열.
Return value
설명 텍스트를 포함하는 문자열.

예제

VBScript

' This example assumes there is at least 1 attachment field 
' and 1 attachment associated with the record. 
set currentSession = GetSession  set attachFields = AttachmentFields 
set attachField1 = attachFields.Item(0) 
set theAttachments = attachField1.Attachments 
For each attachment in theAttachments 
    theDescription = attachment.Description
    key = attachment.DisplayName 
    currentSession.OutputDebugString "Unique key: " & key & _
        " - description: " & theDescription
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 fields
$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++)
 {
 # Retrieve the correct attachment
 $attachment = $attachments->Item($x);
     # Get the unique attachment key and the attachment description 
     # and print it out
 $description = $attachment->GetDescription();
 $key = $attachment->GetDisplayName();
 $session->OutputDebugString("Unique key: ".$key." - description:
         ".$description);
 } 

피드백