Operation Details
Description: retrieves all of the active communication records whose correspondentConcernRoleID equals to concernRoleID specified in the key, for the specified date range.
Sterotype: nsmulti
SQL
SELECT
  communicationID,
  concernRoleID,
  typeCode,
  proFormaVersionNo,
  methodTypeCode,
  incomingInd,
  communicationDate,
  statusCode,
  correspondentName,
  correspondentConcernRoleID,
  correspondentTypeCode,
  subjectText,
  documentLocation,
  documentRefNumber,
  fileLocation,
  fileReferenceNumber,
  caseID,
  ticketID,
  userName,
  comments,
  communicationText,
  addressID,
  phoneNumberID,
  emailAddressID,
  proFormaID,
  communicationStatus,
  proFormaInd,
  attachmentInd,
  versionNo
INTO
  :communicationID,
  :concernRoleID,
  :typeCode,
  :proFormaVersionNo,
  :methodTypeCode,
  :incomingInd,
  :communicationDate,
  :statusCode,
  :correspondentName,
  :correspondentConcernRoleID,
  :correspondentTypeCode,
  :subjectText,
  :documentLocation,
  :documentRefNumber,
  :fileLocation,
  :fileReferenceNumber,
  :caseID,
  :ticketID,
  :userName,
  :comments,
  :communicationText,
  :addressID,
  :phoneNumberID,
  :emailAddressID,
  :proFormaID,
  :communicationStatus,
  :proFormaInd,
  :attachmentInd,
  :versionNo 
FROM
  ConcernRoleCommunication 
WHERE correspondentConcernRoleID = :concernRoleID 
  AND 
  (
    :startDate IS NULL 
    OR communicationDate >= :startDate 
  ) 
  AND 
  (
    :endDate IS NULL 
    OR communicationDate <= :endDate 
  ) 
  AND statusCode = :statusCode 
  AND communicationStatus = :communicationStatus