Operation Details
Description: Searches the AttachmentLink table by related ID, related type and record status, and joins with it's corresponding VerificationAttachmentStatus record, if one exists.
Sterotype: nsmulti
SQL
SELECT 
AttachmentLink.attachmentLinkID, AttachmentLink.attachmentID, AttachmentLink.description, AttachmentLink.recordStatus, AttachmentLink.sensitivityCode, AttachmentLink.creatorUserName, VerificationAttachmentStatus.reviewStatus, VerificationAttachmentStatus.lastModifiedBy, VerificationAttachmentStatus.lastModifiedDate 
INTO
:attachmentLinkID, :attachmentID, :description, :recordStatus, :sensitivityCode, :createdBy, :reviewStatus, :lastModifiedBy, :lastModifiedDate
FROM
AttachmentLink
LEFT JOIN 
VerificationAttachmentStatus on AttachmentLink.attachmentLinkID=VerificationAttachmentStatus.attachmentLinkID
WHERE
AttachmentLink.relatedObjectID=:relatedObjectID AND AttachmentLink.relatedObjectType=:relatedObjectType AND AttachmentLink.recordStatus=:recordStatus