Operation Details
Description: Searches the AttachmentLink table by related ID, related type, record status, and searches for a corresponding VerificationAttachmentStatus record for the given review status.
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
INNER JOIN 
VerificationAttachmentStatus on AttachmentLink.attachmentLinkID=VerificationAttachmentStatus.attachmentLinkID
WHERE
AttachmentLink.relatedObjectID=:relatedObjectID AND AttachmentLink.relatedObjectType=:relatedObjectType AND AttachmentLink.recordStatus=:recordStatus AND VerificationAttachmentStatus.reviewStatus=:reviewStatus