Operation Details
Description: This method will return the attachmentID and attachmentName of an attachment to a communication if one exists. Part of the key will be the activeAttachmentStatusCode which will be passed in from the client to ensure that only an active attachment is returned.
Sterotype: ns
SQL
SELECT
  Attachment.attachmentID,
  Attachment.attachmentName
INTO
  :attachmentID,
  :attachmentName 
FROM
  Attachment,
  CommAttachmentLink 
WHERE CommAttachmentLink.communicationID = :communicationID 
  AND Attachment.attachmentID = CommAttachmentLink.attachmentID 
  AND Attachment.attachmentStatus = :activeAttachmentStatusCode 
  AND Attachment.statusCode = :statusCode