Operation Details
Description: Searches for all the records matching the case id , related reference type and one of the statuses provided.
Sterotype: nsmulti
SQL
SELECT 
affectedRelatedReferenceID,
caseID,
relatedReferenceID,
relatedReferenceType,
relatedReferenceStatus,
createdBy,
createdOn,
lastUpdatedBy,
lastUpdatedOn, 
versionNo

INTO 
:affectedRelatedReferenceID,
:caseID,
:relatedReferenceID,
:relatedReferenceType,
:relatedReferenceStatus,
:createdBy,
:createdOn,
:lastUpdatedBy,
:lastUpdatedOn,
:versionNo

FROM AFFECTEDRELATEDREFERENCE WHERE 
AFFECTEDRELATEDREFERENCE.caseID = :caseID AND AFFECTEDRELATEDREFERENCE.relatedReferenceType = :relatedReferenceType AND
(AFFECTEDRELATEDREFERENCE.relatedReferenceStatus = :relatedReferenceStatus1 OR AFFECTEDRELATEDREFERENCE.relatedReferenceStatus = :relatedReferenceStatus2)